T
tim johnson
I have given below a way to add records to a table.
Is there any performance issues that would make this
method more or less efficient that using SQL statements
in an Update query?
Dim rst As ADODB.Recordset
Dim cnn As ADODB.Connection
Dim strSLQ As String
Set rst = New ADODB.Recordset
Set cnn = CurrentProject.Connection
Dim strSQL As String
'procedure to auto update auxillary accounts
strSQL = "SELECT AuxillaryID, Comments, TransDate,
Debit FROM tblAuxillaryDetails"
rst.Open strSQL, cnn, adOpenKeyset, adLockOptimistic,
adCmdText
rst.AddNew
rst!AuxillaryID = Forms!frmTrans!frmTransSubSub!
AuxillaryID
rst!Comments = Forms!frmTrans!frmTransSubSub!
AuxillaryComments
rst!TransDate = Forms!frmTrans!DatePaid
rst!Debit = Forms!frmTrans!frmTransSubSub!Debit
rst.Update
rst.Close
Is there any performance issues that would make this
method more or less efficient that using SQL statements
in an Update query?
Dim rst As ADODB.Recordset
Dim cnn As ADODB.Connection
Dim strSLQ As String
Set rst = New ADODB.Recordset
Set cnn = CurrentProject.Connection
Dim strSQL As String
'procedure to auto update auxillary accounts
strSQL = "SELECT AuxillaryID, Comments, TransDate,
Debit FROM tblAuxillaryDetails"
rst.Open strSQL, cnn, adOpenKeyset, adLockOptimistic,
adCmdText
rst.AddNew
rst!AuxillaryID = Forms!frmTrans!frmTransSubSub!
AuxillaryID
rst!Comments = Forms!frmTrans!frmTransSubSub!
AuxillaryComments
rst!TransDate = Forms!frmTrans!DatePaid
rst!Debit = Forms!frmTrans!frmTransSubSub!Debit
rst.Update
rst.Close