View Single Post
  #1 (permalink)  
Old October 8th, 2003, 01:28 PM
sporkman43 sporkman43 is offline
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating specific records

I'm trying to modify a set of records where it loops through all of the records where the value for "email" in the Room table is set to null. It should go through a bit of code, then set the email value to "1" and then update the records, but it gives me this error:

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

Is it possible to set the recordset to adLockOptimistic so I can update the records, or is this method just way off what I should do? Any help is appreciated. Code is below.
<%@ Language=VBScript %>
<% Option Explicit %>


<%
include files....
Dim var...
Set objRS = Server.CreateObject("ADODB.Recordset")
strconn = "SELECT * FROM Room WHERE (email IS NULL)"
Set objRS = objConn.execute(strconn)
code...
code...
code...
objRS("email") = "1" <--- line 126
objRS.Update
Close everything...
%>