Morning all,
I have the following snippet of code which connects to our sqlServer via ADO:-
I appreciate that network connectivity/speed will vary for many different reasons. At present, importing 140,000 records is taking around 20/30 minutes using this method.
I have had to create a routine that first imports the data to the users own Front-End and then transfer the data to the Back-End table. This seems to speed up the process a little.
My question is can the above code be changed so that it works more efficiently, thus speeding up the process?
Thanks in advance for advice and feedback.
I have the following snippet of code which connects to our sqlServer via ADO:-
Code:
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sConnString As String
sConnString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security " & _
"Info=True;Initial Catalog=PostTripDM;Data Source=SERVER5;" & _
"Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;" & _
"Tag with column collation when possible=False"
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.Open sConnString
Set rs = conn.Execute("SELECT TEST_ID, ClientID FROM dimTEST;")
Do Until rs.EOF
CurrentDb().Execute ("INSERT INTO tbl_DboDimTESTLocal VALUES (""" & rs("TEST_ID") & """,""" & rs("ClientID") & """);")
rs.MoveNext
Loop
I appreciate that network connectivity/speed will vary for many different reasons. At present, importing 140,000 records is taking around 20/30 minutes using this method.
I have had to create a routine that first imports the data to the users own Front-End and then transfer the data to the Back-End table. This seems to speed up the process a little.
My question is can the above code be changed so that it works more efficiently, thus speeding up the process?
Thanks in advance for advice and feedback.