Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > BOOK: Beginning ASP 3.0
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 4th, 2008, 06:46 PM
Registered User
 
Join Date: Apr 2008
Location: montijo, montijo, Portugal.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default CHAPTER15-ADODB.Recordset (0x800A0CC1)

Hi all

Can anyone help me, im getting the error mentioned bellow,and i dont know why.
"Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/BegASP/BeginningASP3/Ch15/Ch151/AddUser.asp, line 22"


Many thanks

<%
  Dim rsUsers
  Set rsUsers = Server.CreateObject("ADODB.Recordset")
  rsUsers.Open "Person", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

  If Session("PersonID") <> "" Then ' currently logged-on user
    rsUsers.Filter = "PersonID = '" & Session("PersonID") & "'"
  Else ' New session
    rsUsers.Filter = "EMailAddress = '" & Request.Form("email") & "'" & _
                     "AND Password = '" & Request.Form("password") & "'"
    If rsUsers.EOF Then ' User not found
      rsUsers.AddNew ' ...so add a new record
' Else
' Email address and password matched with DB records -
' In this case we'll allow this to update user's personal details
    End If
  End If
                                                  ' write personal details to record
  rsUsers("EMailAddress") = Request.Form("email")
  rsUsers("Password") = Request.Form("password")
  rsUsers("FamilyName") = Request.Form("FamilyName")
  rsUsers("GivenName") = Request.Form("GivenName")
  rsUsers("StreetAddress1") = Request.Form("Address1")
  rsUsers("StreetAddress2") = Request.Form("Address2")
  rsUsers("City") = Request.Form("City")
  rsUsers("State") = Request.Form("State")
  rsUsers("PostalCode") = Request.Form("PostalCode")
  rsUsers("Country") = Request.Form("Country")
  rsUsers("Active") = True
  rsUsers("LastLogin") = Now
  rsUsers.Update ' update the database

  Dim strName, strValue ' create session variables
  For each strField in rsUsers.Fields
    strName = strField.Name
    strValue = strField.value
    Session(strName) = strValue
  Next
  Session("blnValidUser") = True ' declare that current user is validated
  Response.Redirect "MenuForRegisteredUsers.asp"
%>

uitr
  #2 (permalink)  
Old April 4th, 2008, 07:54 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

If i have counted correctly, line 22 is:
rsUsers("FamilyName") = Request.Form("FamilyName")

The answer to your question is that you are trying to access a field in your recordset that doesn't exist. (Possibly a typo?)

On errors such as these google contains a wealth of information
http://www.google.com/search?q=ADODB...x=&startPage=1


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error lance Wrox Book Feedback 2 February 23rd, 2007 02:37 PM
ADODB Recordset sporkman43 Classic ASP Basics 4 November 9th, 2006 04:51 AM
ADODB.Recordset (0x800A0CC1) crmpicco Classic ASP Databases 2 November 16th, 2005 10:28 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
How to get adodb.record from adodb.recordset John Pennington Pro VB Databases 1 November 20th, 2004 06:17 AM



All times are GMT -4. The time now is 12:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.