|
-
May 16th, 2000, 08:31 PM
#1
Hi:
I have the following piece of code which works well under SQL Server 6.5. But it gives a "Cursor is Read Only" error at the Update statement under SQL Server 7.0.
Set rsheader = New ADODB.Recordset
rsheader.Open strSQL, cnnODBC, adOpenDynamic, adLockOptimistic
Do While Not rsheader.EOF
rsheader.Update "Status", "P"
' more code here
rsheader.movenext
loop
Could somebody let me know what is wrong in the above code?
Thanks.
-
May 16th, 2000, 09:59 PM
#2
Addicted Member
I don't know for sure but I have had the same types of problems with SQL (7.0). You might want to try and change the CursorLocation. There are two settings adUseClient and adUseServer. I would try and change this and see what happens. I am finding however, that sometimes you lose the ability to use the AbsolutePosition and RecordCount when CursorLocation is not set properly.
The other thing you might try is a different Provider to connect to the Server. Some providers behave differently.
-
May 17th, 2000, 12:45 AM
#3
I changed the value of recordset.CursorLocation from the default adUseServer to adUseClient and that solved my problem.
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
|