benniesanders
Programmer
Hi everybody,
I will preface this post with "This is new to me!". I've been raked
through the coals in DevDex before for asking elementary questions, so
I'm feeling a bit inadequate right now.
I am trying to insert data into a table using the following code:
strSQL2 = "select custid,productid,qty,priceperunit,session from holding
where session='"& sessionid &"'"
db.Execute(strSQL2)
set oRsTemp=db.execute(strSQL2)
Do until oRsTemp.EOF
strSQL = "insert into holding
(custid,productid,qty,priceperunit,session)
values('"&session("custid"
&"','"&rscart("productid"
&"','"& acart(i,1)
&"'," & currentprice & ",'" & sessionid & "');"
db.Execute(strSQL)
oRsTemp.MoveNext
Loop
However, it's not inserting the data. I think it could possibly work
because I used "do while" instead of "do until" and it entered the first
record but gave me the following error message:
ADODB.Recordset error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted; the
operation requested by the application requires a current record.
/functions.asp, line 351
I don't know what to do. I've been trying to make this work since last
night. I'd greatly appreciate any help or direction.
Thanks.
I will preface this post with "This is new to me!". I've been raked
through the coals in DevDex before for asking elementary questions, so
I'm feeling a bit inadequate right now.
I am trying to insert data into a table using the following code:
strSQL2 = "select custid,productid,qty,priceperunit,session from holding
where session='"& sessionid &"'"
db.Execute(strSQL2)
set oRsTemp=db.execute(strSQL2)
Do until oRsTemp.EOF
strSQL = "insert into holding
(custid,productid,qty,priceperunit,session)
values('"&session("custid"
&"'," & currentprice & ",'" & sessionid & "');"
db.Execute(strSQL)
oRsTemp.MoveNext
Loop
However, it's not inserting the data. I think it could possibly work
because I used "do while" instead of "do until" and it entered the first
record but gave me the following error message:
ADODB.Recordset error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted; the
operation requested by the application requires a current record.
/functions.asp, line 351
I don't know what to do. I've been trying to make this work since last
night. I'd greatly appreciate any help or direction.
Thanks.