I have a question that has been bothering my team.
We just converted from SQL Server 6.5 to 7.0.
We inherited some code that seemingly worked under 6.5.
The recordset data was retrieved, then looped to delete each record.
The code is as follows:
.Open strSQL, madoConn, adKeyset, adLockBatchOptimistic
While Not .EOF
.MoveNext 'Invalid bookmark error happens here
Under SQL 6.5, the records were deleted correctly after an .UpdateBatch
Under SQL 7.0, the loop iterates through the recordset but eventually the
method will cause an Invalid Bookmark error. (NOTE: I know that a simple
against the connection will do the same job, but we can't do anything with
the code because
the app is in production. This will be fixed in the next release.)
Why is this happening and can it be fixed with service packs?
We are using the following drivers:
OLEDB provider: MSDASQL (We will use the SQLOLEDB provider on the
MDAC 2.1 sp1
Thanks in advance,
Don Garcia MCSD, MCDBA
Software Architects, Inc.