p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Databases (http://p2p.wrox.com/forumdisplay.php?f=62)
-   -   Just started with ASP. Question! (http://p2p.wrox.com/showthread.php?t=1327)

changingfaces July 7th, 2003 03:36 AM

Just started with ASP. Question!
 
Hey I wonder if any one could help me with this error:
I was using the source code in ASP 3.0 Chapter 15. The ADDUSER.ASP
and I have this error:

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'adOpenForwardOnly'

/wildxchange/adduser.asp, line 14

why is this happening?


bosboom July 7th, 2003 03:49 AM

There is a special include file in where these constants are defined:

    adovbs.inc

at the top of your page include the file

or


You can download it from a website of me

http://www.davilex.com/lib/asp/adovbs.inc

Greetz,

Bosboom


changingfaces July 7th, 2003 06:48 PM

thank u for your help. I am getting some other error:
ADODB.Recordset error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/wildxchange/adduser.asp, line 33

------------------------this is the adduser.asp----------------------


<%
Dim rsUsers


Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "Person", oConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

If Session("UserID") <> " " Then ' currently logged-on user
     rsUsers.Filter = "UserID ='" & Session("UserID") & "'"
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("EAddy") = Request.Form("email")
rsUsers("FName") = Request.Form("First")
rsUsers("LName") = Request.Form("Last")
rsUsers("PStrt1") = Request.Form("Addy1")
rsUsers("PStrt2") = Request.Form("Addy2")
rsUsers("City") = Request.Form("City")
rsUsers("State")= Request.Form("State")
rsUsers("Zip") = Request.Form("ZipCode")
rsUsers("Country") = Request.Form("Country")
rsUsers("SecretQuestion") = Request.Form("SecretQuestion")
rsUsers("SecretAnswer") = Request.Form("SecretAnswer")
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"
%>

----------------------------------
can u help me out here?


Toran July 8th, 2003 07:10 PM

rsUsers.move first

If Session("UserID") <> " " Then ' currently logged-on user
     rsUsers.Filter = "UserID ='" & Session("UserID") & "'"
Else ' New session


try to move to the beginning of you data collection first with something like rsuser.MoveFirst

Toran


Toran July 9th, 2003 04:05 PM

akkk sorry ... it's rsUser.movefirst ... shoot the typist


Benny P July 9th, 2003 04:29 PM

My friend, I've been having the same problem. I posted a similar thread on the site below. Read the reply to this post and see if that helps. It worked for me.

http://www.sqlmag.com/forums/message...39&STARTPAGE=1


changingfaces July 10th, 2003 10:25 PM

Quote:

quote:Originally posted by Benny P
 My friend, I've been having the same problem. I posted a similar thread on the site below. Read the reply to this post and see if that helps. It worked for me.

http://www.sqlmag.com/forums/message...39&STARTPAGE=1


thanks!



All times are GMT -4. The time now is 09:28 PM.

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