I'm using ADO to update a pass-through-query to MS SQL and it takes a very long time to execute this line of code from the following procedure to update the query:
Set cmd = cat.Procedures(strQdfName).Command
Furthermore, it appears that when I execute this line of code, other pass-through-queries in the database are executed even though they should not be initiated in any way from this query. I can't understand why this is happening.
Thanks
Dim cat As ADOX.Catalog
Dim cmd As ADODB.Command
Set cat = New ADOX.Catalog
Set cat.ActiveConnection = CurrentProject.Connection
Set cmd = cat.Procedures(strQdfName).Command
cmd.Properties("Jet OLEDB:ODBC Pass-Through Statement"
= True
cmd.CommandText = strSql
If Not IsMissing(varConnect) Then
cmd.Properties("Jet OLEDB
ass Through Query Connect String"
= CStr(varConnect)
End If
cmd.Properties("Jet OLEDB
Ass Through Query Bulk-Op"
= Not fRetRecords
Set cat.Procedures(strQdfName).Command = cmd
Set cmd = Nothing
Set cat = Nothing
Set cmd = cat.Procedures(strQdfName).Command
Furthermore, it appears that when I execute this line of code, other pass-through-queries in the database are executed even though they should not be initiated in any way from this query. I can't understand why this is happening.
Thanks
Dim cat As ADOX.Catalog
Dim cmd As ADODB.Command
Set cat = New ADOX.Catalog
Set cat.ActiveConnection = CurrentProject.Connection
Set cmd = cat.Procedures(strQdfName).Command
cmd.Properties("Jet OLEDB:ODBC Pass-Through Statement"
cmd.CommandText = strSql
If Not IsMissing(varConnect) Then
cmd.Properties("Jet OLEDB
End If
cmd.Properties("Jet OLEDB
Set cat.Procedures(strQdfName).Command = cmd
Set cmd = Nothing
Set cat = Nothing