Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Inserts of records

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I am trying to do a multiple insert of records into a database and I am getting an error on my submition. the error I am getting is below. I am new to ASP and have never done a multiple insert.

Error Type:
ADODB.Recordset (0x800A0CB3)
Object or provider is not capable of performing requested operation.
/am1st/MyStuff/updatetest/maintain1.asp, line 57

Here is my code.

<%

if request(&quot;Selected2&quot;) = &quot;1&quot; Then
dbrs2.open (&quot;Select * From Timesheet where userID = '&quot; & request.form(&quot;employee&quot;)& &quot;' and month = '&quot; & request.form(&quot;month&quot;)& &quot;'&quot; ), dbconn, 0, 1
dbrs2.movefirst
Dim x
x = 1
do while NOT dbrs2.EOF

''dbrs2(&quot;date&quot;)=request(&quot;date&quot; & x)
dbrs2(&quot;hour&quot;)=request(&quot;hour&quot; & x) //This is line 57
''dbrs2(&quot;code&quot;)=request(&quot;code&quot; & x)
dbrs2.update
dbrs2.movenext
x = x + 1
loop
End if
%>
 
adLockOptimistic = 3
adOpenStatic = 3

It looks like you are trying to update a non-updateable recordset.

dbrs2.open (&quot;Select * From Timesheet where userID = '&quot; & request.form(&quot;employee&quot;)& &quot;' and month = '&quot; & request.form(&quot;month&quot;)& &quot;'&quot; ), dbconn, 3, 3

Your options of 0, 1 are read only.
 
Type this to determine if the recordset is updateable...

If dbrs2.Supports(adUpdate) Then
Response.Write &quot;Supports Updates&quot;
End if

If Supports Updates is written on your screen then you know that you can update the recordset.

Brett Birkett B.Comp
Systems Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top