richaa
Apr 4th, 2000, 05:07 AM
What kind of select should I be doing to the database when all I want to do is insert a record?
I am using "select * from tablename". And it is slow I assume because it has to bring back so many records.
I am doing this:
What should I be doing?
stGetRecordSet = "SELECT * FROM MCM_INBOUND_TRAN_TABLE"
If DestinationRS.State = adStateOpen Then
DestinationRS.Close
End If
With DestinationRS
.CursorLocation = adUseClient
.Open stGetRecordSet, Conn, adOpenForwardOnly,
adLockBatchOptimistic, adCmdText
End With
If DestinationRS.State = adStateOpen Then
stGetRecordSet = "INSERT INTO MCM_INBOUND_TRAN_TABLE
(INBOUND_TRAN_TABLE_SEQ_NBR, ORIGINATION_SYSTEM,
DESTINATION_SYSTEM, LENGTH) VALUES
(INBOUND_TRAN_TABLE_SEQ_NBR.NEXTVAL"
& ", 'RMCS', 'CDB', " & (Len(stListMessage) - j) & ")"
Conn.Execute (stGetRecordSet)
End If
I am using "select * from tablename". And it is slow I assume because it has to bring back so many records.
I am doing this:
What should I be doing?
stGetRecordSet = "SELECT * FROM MCM_INBOUND_TRAN_TABLE"
If DestinationRS.State = adStateOpen Then
DestinationRS.Close
End If
With DestinationRS
.CursorLocation = adUseClient
.Open stGetRecordSet, Conn, adOpenForwardOnly,
adLockBatchOptimistic, adCmdText
End With
If DestinationRS.State = adStateOpen Then
stGetRecordSet = "INSERT INTO MCM_INBOUND_TRAN_TABLE
(INBOUND_TRAN_TABLE_SEQ_NBR, ORIGINATION_SYSTEM,
DESTINATION_SYSTEM, LENGTH) VALUES
(INBOUND_TRAN_TABLE_SEQ_NBR.NEXTVAL"
& ", 'RMCS', 'CDB', " & (Len(stListMessage) - j) & ")"
Conn.Execute (stGetRecordSet)
End If