Hi,
I wrote a VB6 program to read some data records from a Ms Access database and to write them into a SQL server database.(I use Ms Access 2000 and SQL server 2000).After reading each record in Access database, I update a text type datafield of that record in Access database to 'Y' (to mark the perticular record as a copied record)(The program does the updation). I tested the program several times by using a seperate copy of the same database each time. Sometimes it worked ok. But randomly it gave an error "Could not update. Currently locked". Again some times it worked ok. I can't understand why this error comes at random times.
What is this error? How can I correct this?
The recordset opening method I used is :
rs.open sSQL , dbConn, adOpenStatic, adCmdTable
For some recordsets I used the method :
rs.open sSQL , dbConn , adOpenStatic, adLockOptimistic
rs:- the recordset
sSQL:- the SQL statement to select the records
dbConn:- the database connection
Is there something wrong with the recordset opening methods?
Can anyone please help me ......
Thanks,
amindi.