Solved

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

Posted on 2011-02-10
5
226 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now