Dim RSID
Dim MaxID
Set RSID = CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set MaxID = CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
MaxID = conn.Execute("Select MAX(bidderid)+1 from bidders"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
conn.Execute "Insert into bidders(bidderid,biddername, password, " _
& "emailaddress, address, csz, phonenumber) values (" _
& MaxID("bidderid"
& "" _
& "'" & TheRequest.Form("Username"
& "', " _
& "'" & TheRequest.Form("Password"
& "', " _
& "'" & TheRequest.Form("EmailAddress"
& "', " _
& "'" & TheRequest.Form("Address"
& "', " _
& "'" & TheRequest.Form("CSZ"
& "', " _
& "'" & TheRequest.Form("PhoneNumber"
& "')"
Set RSID = conn.Execute("Select Max(bidderid) as MaxID " _
& "from bidders"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
TheSession("BidderID"
= RSID("MaxID"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End Sub
Right now I have having errors in the the line whereby I tried to pass in the recordset "MaxID". Is my quotation right? after the concatenation & , I shouldn't be adding a double quotation since its a variable?
Can some show me the correct way of putting quotes? or the rules?
Error Type:
ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/Register_ID.asp, line 7
Dim MaxID
Set RSID = CreateObject("ADODB.Recordset"
Set MaxID = CreateObject("ADODB.Recordset"
MaxID = conn.Execute("Select MAX(bidderid)+1 from bidders"
conn.Execute "Insert into bidders(bidderid,biddername, password, " _
& "emailaddress, address, csz, phonenumber) values (" _
& MaxID("bidderid"
& "'" & TheRequest.Form("Username"
& "'" & TheRequest.Form("Password"
& "'" & TheRequest.Form("EmailAddress"
& "'" & TheRequest.Form("Address"
& "'" & TheRequest.Form("CSZ"
& "'" & TheRequest.Form("PhoneNumber"
Set RSID = conn.Execute("Select Max(bidderid) as MaxID " _
& "from bidders"
TheSession("BidderID"
End Sub
Right now I have having errors in the the line whereby I tried to pass in the recordset "MaxID". Is my quotation right? after the concatenation & , I shouldn't be adding a double quotation since its a variable?
Can some show me the correct way of putting quotes? or the rules?
Error Type:
ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/Register_ID.asp, line 7