A
anasser
How can I insert data (returned from an executed sql server 2000 store
Procedure) to a local MS Access table using VBA, and if its possible,
can I have the cursor run on the server side to make the processing
faster.
'Declarations and connect strings goes here.
'Create New RecordSet
Set Rs = New ADODB.Recordset
Rs.CursorLocation = adUseClient
Rs.Open Cmd.Execute, Conn, adOpenDynamic, adLockReadOnly
'the Cmd.Execute value here is the execution of the
'Server store procedure
If Rs.RecordCount > 0 Then
Rs.MoveFirst
While Not Rs.EOF
sql = "INSERT INTO LocalMSAccessTable(" & _
"Field Names here" & _
"Values()" ??????
DoCmd.SetWarnings False
DoCmd.RunSQL sql
DoCmd.SetWarnings True
Rs.MoveNext
Wend
End If
Thank you
Procedure) to a local MS Access table using VBA, and if its possible,
can I have the cursor run on the server side to make the processing
faster.
'Declarations and connect strings goes here.
'Create New RecordSet
Set Rs = New ADODB.Recordset
Rs.CursorLocation = adUseClient
Rs.Open Cmd.Execute, Conn, adOpenDynamic, adLockReadOnly
'the Cmd.Execute value here is the execution of the
'Server store procedure
If Rs.RecordCount > 0 Then
Rs.MoveFirst
While Not Rs.EOF
sql = "INSERT INTO LocalMSAccessTable(" & _
"Field Names here" & _
"Values()" ??????
DoCmd.SetWarnings False
DoCmd.RunSQL sql
DoCmd.SetWarnings True
Rs.MoveNext
Wend
End If
Thank you