var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: 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
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
rstHDI.open "HepDoseDate", Cnn, adOpenDynamic, adLockOptimistic
If rstHDI.Supports(adAddNew) then
response.write "Can add new rst"
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
response.write "Cannot add new rst"
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
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")
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".
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.