![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I am working on a project where I will be selecting an n'th number of records for 700 reps based on zip codes. My question is the below sql statement worked on an access table... sSQL = "Update OA Set OA.RepID = " & rsRep!RepID & " " _ & "Where OA.PrimaryID In (Select top " & lTempRequest & " " _ & "PrimaryID from OA where zip ='" & rsRep(sZipSelect) & "'" _ & "and RepID is null)" but the above statment doesn't work against a link ODBC connection to SQL server table. It executes but just hangs up. I can issue the following statement in T-SQL on SQL server no problem. update oa set repid = 2 where primaryid in (select top 5000 primaryid from oa where zip = '30121' and repid is null) This is basically the exact same command as the access query. Does anyone know why one works and the other doesn't? I have got a fix in place by using a stored procedure and calling that through access. Probably a better way of doing it anyways... Thanks... |
#4
| |||
| |||
|
|
I am working on a project where I will be selecting an n'th number of records for 700 reps based on zip codes. My question is the below sql statement worked on an access table... sSQL = "Update OA Set OA.RepID = " & rsRep!RepID & " " _ & "Where OA.PrimaryID In (Select top " & lTempRequest & " " _ & "PrimaryID from OA where zip ='" & rsRep(sZipSelect) & "'" _ & "and RepID is null)" but the above statment doesn't work against a link ODBC connection to SQL server table. It executes but just hangs up. I can issue the following statement in T-SQL on SQL server no problem. update oa set repid = 2 where primaryid in (select top 5000 primaryid from oa where zip = '30121' and repid is null) This is basically the exact same command as the access query. Does anyone know why one works and the other doesn't? I have got a fix in place by using a stored procedure and calling that through access. Probably a better way of doing it anyways... Thanks... |
#5
| |||
| |||
|
|
One issue is that ODBC is old technology, becoming outdated. There may be other issues, based on your setup, but ODBC technology is one of the bigger issues. ADO technology is much more reliable and way faster because it has way more bandwidth than ODBC. (more which I have snipped) |
![]() |
| Thread Tools | |
| Display Modes | |
| |