If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Lock Type error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-17-02, 20:44
Rangersfrst Rangersfrst is offline
Registered User
 
Join Date: Apr 2002
Location: TX
Posts: 1
Angry Lock Type error

I am using ASP&ADO to Access a SQL 200 Server where the proper permissions have been allocated for the user and I keep getting this error message

Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

I have tried all of the LockTypes and no change. I have tried a combination of all the lock types with the cursor types as well but still this error.

Here is the code that does the work

If rstHDD.EOF then
Call RST_New(rstHDI)
rstHDI.open "HepDoseDate", Cnn, adOpenDynamic, adLockOptimistic
If rstHDI.Supports(adAddNew) then
response.write "Can add new rst"
rstHDI.AddNew
rstHDI.Fields("EmployeeID").Value = empid
rstHDI.Fields("Consent").Value = consent
rstHDI.Fields("Decline").Value = decline
rstHDI.Fields("Shot1").Value = shot1
rstHDI.Fields("Shot2").Value = shot2
rstHDI.Fields("Shot3").Value = shot3
rstHDI.Update
Else
response.write "Cannot add new rst"
End If
Else
response.write " Updating"
rstHDD.Fields("Consent").Value = consent
rstHDD.Fields("Decline").Value = decline
rstHDD.Fields("Shot1").Value = shot1
rstHDD.Fields("Shot2").Value = shot2
rstHDD.Fields("Shot3").Value = shot3
rstHDD.update
End If

I cannot addnew or update recordsets. Please let me know if you see the problem.

the Call RST_New
just sets the rst = server.createobject("ADODB.Recordset")
Reply With Quote
  #2 (permalink)  
Old 05-01-02, 15:54
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
If you have access to vb, I would run the same code and see if the problem persists. If it does, set a break point after the connection to the database is made and look at the locals view and look at the properties. You will see the provider information and it will tell if it is updatable or not. Also, I would try updating the same information using SQL Query Analyzer - logging in as the same user. I do not see the connection information as to how you are connecting - but I would also try the same code logged in as "sa".

Good luck.
Reply With Quote
  #3 (permalink)  
Old 05-28-02, 19:17
helpimstuck helpimstuck is offline
Registered User
 
Join Date: May 2002
Posts: 25
did you include the vb constants file?

if not, that might be the problem.

you can also try

rs.open rstHDI.open "HepDoseDate", Cnn, 1, 2

that should work.

oh, just a tip, when you just say "HepDoseDate", you return the ENTIRE table. do a select statement that returns no records at all. like

select * from HepDoseDate were PKID = 0

since most identities start at 1, that should return 0 records.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On