3146 ODBC Call Failed

S

Selvam Paramasivan

The application has Access with linked tables(SQL Server) It has VBA code
that uses linked tables to select and do some calculation and update access
tables. Sql server accessed through DSN and queries are executed using
'DoCmd.RunSQL'.

The code runs for 12 times for 12 quarters and the following error 'Error
3146 ODBC Call Failed' was thrown every time. The error was 99% consistent
at same query but not inconsistent in the loop. sometimes 1 quarter and
sometimes 4th quarter like that. When the error handling disabled and in
debug mode the query was highlighted, if we press f5, it runs fine. And
after sometime it fails again and if we repeat same steps, it runs fine.
Included DoEvents, no luck.

If the app runs completely in debug mode, it runs fine. Couldn't able to
find out the reason for the fail.

Thanks in advance.
 
A

Alex Dybenko

Hi,
it should be a second error message after "ODBC Call Failed", which explains
why call failed. this could give you an idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top