Solved

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

910 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

24 Experts available now in Live!

Get 1:1 Help Now