|
-
Feb 23rd, 2009, 10:52 AM
#1
Thread Starter
Junior Member
ADO Error on .update VB6/MySQL
Hi everyone,
i am seeking advise on a problem, that has been discussed here a couple of times, still i couldnt find an answer to my problem. I found a couple of solutions but they didnt work in my case.
Maybe someone can point out what is going wrong. I am working on an old company application moving it from oracle with rdo to mysql with ado 2.8.
ODBC 3.51 Connector is used since the 5.0 crashes my Visual Basic gui instantly on .open "select....".
Selects and executes work great and i seem to have no issues here. But i get an odd error on the .updates.
Run-time Error '-2147217864'
Row cannot be located for updating, some values may have been changed since it was last read.
The Application is used by arround 10 Users here simultaniously, records that are "in use" are marked in a seperate table, to avoid simultanious overwrites.
A typical update in the application looks like this:
Code:
Dim adoTMP As ADODB.Recordset
adoTMP.CursorType = adOpenDynamic
adoTMP.CursorLocation = adUseClient
adoTMP.LockType = adLockOptimistic
adoTMP.ActiveConnection = dbs
adoTMP.Open "SELECT NamenID, woerter, woerterp FROM NAMEN WHERE NamenID = " & NamenID
With adoTMP
.Fields("woerter").Value = wörter
.Fields("woerterP").Value = wörterP
.Update
.Close
End With
The table had open connections from other recordsets but they are all closed at the time i update these fields. The "fun" thing is, all the data gets saved perfectly fine. I tried updates for the whole table several times doing ~3000 .updates all bringing the error and still they where saved fined.
All Selects that do not need update are "readonly" recordsets.
I could use .execute for the update, but would like to find a solution for this awell. I hate having unsolved problems 
Another slight issues i have is err. "3219" not allowing me to close a recordset, eventhough nothing has been changed...but i havent had time to go through the search results of the forums, so i may have a question about that later 
Maybe someone can help me to find a solution for this.
thx alot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|