Hi All,
I am using the following code to insert a value in an Access table, but it seems slow.
Can anyone offer some suggestions for tuning the code?
Dim CurrConn As New ADODB.Connection
Dim CurDB
Dim intReturnID As Integer
'Create our database and connection objects.
Set CurDB = CurrentDb
Set CurrConn = New ADODB.Connection
'Set some connection object parameters.
With CurrConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source = " & CurDB.Name
.Open
End With
'Execute the insert statement with the connection object.
CurrConn.Execute "Insert into tblAllocation(Billing_ID, Allocation_Amount, Unit_ID) values (" & intBillingID & ", " & curAllocationAmount & ", " & intUnitID & "
;"
I am using the following code to insert a value in an Access table, but it seems slow.
Can anyone offer some suggestions for tuning the code?
Dim CurrConn As New ADODB.Connection
Dim CurDB
Dim intReturnID As Integer
'Create our database and connection objects.
Set CurDB = CurrentDb
Set CurrConn = New ADODB.Connection
'Set some connection object parameters.
With CurrConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source = " & CurDB.Name
.Open
End With
'Execute the insert statement with the connection object.
CurrConn.Execute "Insert into tblAllocation(Billing_ID, Allocation_Amount, Unit_ID) values (" & intBillingID & ", " & curAllocationAmount & ", " & intUnitID & "