ODBC error 3156


Gijs Beukenoot


I'm a bit confused finding the source of the ODBC error 3156 (Delete on
linked table <name> failed).

I'm having a form showing me the contents of a table. On top, I have a
combobox showing me the names so I can easily jump to the correct
record. The combo is filled using a query on the same table. This all
works fine.

However, when I try to delete a record, I get the above error. I would
expect it to raise error 3146 when I have related records (in fact it
does (immediately) when that is the case) but this one takes a while
(odbc time-out).
Even when I open the table and try to delete the record directly, it
gives me the error.
On the other hand, closing the database, opening it again, opening the
table and then trying to delete the record, it works fine.
I've searched my form and other code to see if I open the table
somewhere and forget to close it but that doesn't seem the case.

Does anybody has any additional info on the error?







What structure your database have? I recently struggled with ODBC timing
out intermittantly when I was in the middle of converting an Access Database
(.mdb) to having a SQL backend. Sometimes it would work fine and sometimes
things would take forever and then I would get the ODBC timing out. I don't
recall the error number though.

For me, the issue turned out to be that the ODBC connection between the .mdb
front end and the backend SQL tables really isn't efficient. Too much data
is trying to be crammed into the connection and it eventually fails. The
solution in my case was converting the .mdb front end to an .adp (Access Data
Project). Since ADP was specifically designed to communicate with the SQL
tables (without an ODBC connection) it is much more efficient. I also had to
change some of the underlying recordsources of my forms to restrict the data
that is being loaded into them to make them more efficient.

If this sounds like it may be your issue feel free to ask me for any more
details that might be helpful. I'm still learning but I'd be happy to point
you in the right direction. My application is definately running much better

These vague errors can really drive a person nuts! Good luck!

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

Similar Threads

ODBC error 0
ODBC connection error.. 0
ODBC Connection Error 0
ODBC Timeout Error 1
ODBC connection error 2
ODBC timeout error 0
ODBC Error 3151 on conection of MYSql ODBC Connection 0