Forum Moderators: open

Message Too Old, No Replies

ADODB.Recordset(0x800A0BB9)

Can anyone please help me. Thank you.

         

lawrence

4:21 pm on Dec 17, 2003 (gmt 0)



Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
lines 9.
<html>
<body>
<!-- #include file ="DataStore.asp" -->
<%
Dim oRS, oConn
Set oRS = Server.CreateObject("ADODB.Recordset")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "DSN=Cigarettes"
oRS.Open "SELECT * FROM Cigarette_brands", oConn, adOpenKeySet, adLockOptimistic
oRS.AddNew
oRS.Field("Brands") = Resquest.Form("Brands")
oRS.Field("Manufacturer") = Request.Form("Manufacturer")
oRS.Update
Response.Write "<p> A new Cigarettes has been created " _
& "using the following values: </p>" _
& "<p>Brands: " & oRS.Field("Brands") _
& "<br>Manufacturer: " & oRS.Field("Manufacturer") & "</p>"
oRS.Close
%>
</body>
</html>

Zaphod Beeblebrox

1:03 pm on Dec 18, 2003 (gmt 0)

10+ Year Member



Had the same problem a couple of days ago. Changing it to:


oRS.CursorType = 1
oRS.LockType = 3
oRS.Open "SELECT * FROM Cigarette_brands", oConn

worked for me...