Access 2002 generates run time error 3157 ODBC update failed

T

TrilobyteMKR

If I run a query from the query grid using ODBC it works. If I run it from
VBA it fails with and ODBC run time error 3157.
This is my code
Dim stDocName As String

stDocName = "Qry_ClearAllFlagsinABIProjects"
DoCmd.OpenQuery stDocName, acNormal, acEdit

The query just updates 270 records setting a value to null
It normally runs in about 2 / 3 seconds.

I have run repair, updated sql server to sp3, copied the all of the access
objects to a new database, created a new dsn etc etc all fails.
Any suggestion?
thanks
Malcolm
 
D

deng

TrilobyteMKR said:
If I run a query from the query grid using ODBC it works. If I run it from
VBA it fails with and ODBC run time error 3157.
This is my code
Dim stDocName As String

stDocName = "Qry_ClearAllFlagsinABIProjects"
DoCmd.OpenQuery stDocName, acNormal, acEdit

The query just updates 270 records setting a value to null
It normally runs in about 2 / 3 seconds.

I have run repair, updated sql server to sp3, copied the all of the access
objects to a new database, created a new dsn etc etc all fails.
Any suggestion?
thanks
Malcolm
 

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