[RESOLVED] Custom Recordset
Hello guys
I'm trying to use a recordset without a database. I'm having some problems
I got this error
Quote:
ADODB.Fields error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/rev/order_Rs/dynRecordset.asp, line 13
this is my code
Code:
<%
Dim rsCustomers
set rsCustomers = Server.CreateObject("ADODB.Recordset")
With rsCustomers
.ActiveConnection=Nothing
' Set CustomerID as the primary key.
.Fields.Append "CustomerID", adChar, 5, adFldRowID
.Fields.Append "CompanyName", adChar, 40, adFldUpdatable
.Fields.Append "Address", adChar, 60, adFldUpdatable
.Fields.Append "City", adChar, 15, adFldUpdatable
.Fields.Append "PostalCode", adChar, 10, adFldMayBeNull
.Fields.Append "Country", adChar, 15, adFldUpdatable
.Fields.Append "Phone", adChar, 24, adFldUpdatable
' Use Keyset cursor type to allow updating records.
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open
End With
'Now you have a <span class="highlight">recordset</span>, let's put values in it:
With rsCustomers
.AddNew
.Fields("CustomerID").Value="AMV"
.Fields("CompanyName").Value="PA"
.Fields("Phone").Value="12345678"
.Update
response.Write .fields("Phone")
End With
set rsCustomers = nothing
%>
can someone give me some help here?
Thank you