"ODBC call failed" on one specific query to SQL Server, no matter ODBC, ADO, pass through, etc.

The same query can work using one variable in the where clause, but fail using another -- same table, same query.
cagilbertAsked:
Who is Participating?
 
cagilbertConnect With a Mentor Author Commented:
I now have a work-around that copies the records from the one SQL Server table that is causing a problem to the Access front-end,  Then I've changed the query to use that data.  (The previous batch is deleted each time and the front-end compacts each night so it shouldn't get too much bigger.)  
0
 
Anthony PerkinsCommented:
Post the query and the consition that it fails with and the one that is successful.
0
 
cagilbertAuthor Commented:
set rs = db.OpenRecordset("Select * from tbl where TSid = " & lngTsID)

is one variation that fails.  lngTSIS is a number.  sometimes it works sometimes not.
0
 
Anthony PerkinsCommented:
I am sorry but I am afraid that does not help me.  I was asking for the specific values in your condition that fail and which are successful.

Hopefully, someone will step up to the plate with some insight.

Good luck.
0
 
cagilbertAuthor Commented:
It doesn't figure out the issue, but it solves the problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.