?
Solved

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

Posted on 2011-02-10
5
Medium Priority
?
240 Views
Last Modified: 2012-05-11
The same query can work using one variable in the where clause, but fail using another -- same table, same query.
0
Comment
Question by:cagilbert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 34868095
Post the query and the consition that it fails with and the one that is successful.
0
 

Author Comment

by:cagilbert
ID: 34868205
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 34876323
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
 

Accepted Solution

by:
cagilbert earned 0 total points
ID: 34876498
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
 

Author Closing Comment

by:cagilbert
ID: 34904897
It doesn't figure out the issue, but it solves the problem.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question