ODBC error on multiple update Access 2000 to SQL 2000

I

Ian Bayly

I have a very simple piece of ADO code updating a SQL
table from Access.
Under some circumstances I need run the code twice,
consectively, with different data.
I get an ODBC Call failed (-2147467259)on the second
update.
I've put a delay (approx 500 msecs) between each
repetition of code, and no error. Less than 500 ms, back
comes the error.
Here is some common code I use to open RS

Set myCn = CurrentProject.Connection
myCn.CursorLocation = adUseClient
Set MakeRS = New ADODB.Recordset
MakeRS.CursorType = adOpenKeyset
MakeRS.LockType = adLockPessimistic
MakeRS.Open sSQL, myCn, , adCmdTable

Any ideas appreciated - in 2003 I shouldn't need timing
loops in code!

Ian Bayly
 
I

Ian Bayly

Easy fix
I had a compoundkey including Now()
The now() was returning same date/time on second pass.

Ian B
 

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