[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] Two erros - Recordset is read-only & unsupported locktype
- Subject: [cobalt-developers] Two erros - Recordset is read-only & unsupported locktype
- From: "Todd Kirk" <tkirk@xxxxxxxxxxxxxx>
- Date: Wed Sep 4 20:37:01 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Hi all,
Trying to make a page that has products with a text box for entering
quantity to order and do a multiple insert (as example on Charoncart
website). When I hit the submit button I get the error 'Recordset is
read-only'. I have tried change my 'rsProducts.LockType = 3' to 1, 2, 3
and 4 values. 1,2 & 3 values give the same error of 'recordset is
red-only' but when I use the value of 4 the error is 'unsupported lock
type'. Can anyone help me out please? by the way I am running Chilisap
3.6 with an Interbase V6 Classic database backend.
<%
Dim rsProducts__MMColParam
rsProducts__MMColParam = "1"
if (Session("TM_buyBreak") <> "") then rsProducts__MMColParam =
Session("TM_buyBreak")
%>
<%
set rsProducts = Server.CreateObject("ADODB.Recordset")
rsProducts.ActiveConnection = MM_fixnfast_STRING
rsProducts.Source = "SELECT PRODUCTID, PRODUCTNAME, WEIGHT, UNITPRICE,
BUYBREAK FROM PRODUCTS WHERE BUYBREAK = '" +
Replace(rsProducts__MMColParam, "'", "''") + "'"
rsProducts.CursorType = 0
rsProducts.CursorLocation = 2
rsProducts.LockType = 3
rsProducts.Open()
rsProducts_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsProducts_numRows = rsProducts_numRows + Repeat1__numRows
%>
<%
if request("Selected2") <> "" Then
productarray=split(request("txtProductID"),",")
descrarray=split(request("txtUnitPrice"),",")
pricearray=split(request("txtQuantity"),",")
for i=0 to ubound(productarray)
if len(trim(productarray(i))) > 0 then
rsProducts.addnew
rsProducts("PRODUCTID")=trim(productarray(i))
rsProducts("UNITPRICE")=trim(descrarray(i))
rsProducts("QUANTITY")=trim(pricearray(i))
rsProducts.update
end if
next
response.redirect "orders1.asp"
end if
%>
regards,
Todd Kirk