Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 1st, 2006, 01:18 AM
Registered User
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kprasanna
Default VBScript runtime(0*800A01A8 and ADODB recordset(0*

This is the code and i am having trouble updating old password for a new password.When i type the password incorrectly it directs me to the Failurepage.But when i type the new passowrd for the old one.It just doesnt work
SOmebody please help me out soon. i have to submit this work soon.

It gives me two errors:
1)VBScript runtime(0*800A01A8) object required:'DRIVER={Microsoft AC'/CSS/Login/check_password.asp, line 53

2)ADODB recordset(0*800A0CB3) current Recordset does not support updating.This may be limitaetion of the provider or of the selected loacktype./CSS/Login/check_password.asp, line 55

'Dimension variables
Dim adoCon 'Database Connection Variable
Dim strCon 'Holds the Database driver and the path and name of the database
Dim rsCheckUser 'Database Recordset Variable
Dim strAccessDB 'Holds the Access Database Name
Dim strSQL 'Database query sring
Dim strSQLupdate 'Database update sring
Dim strUserName 'Holds the user name
Dim strOldPass 'Holds the user old Paasword
Dim strNewPass 'Holds the user new Password

'Initalise the strUserName variable
strUserName = Request.Form("txtUserName")
strOldPass = Request.Form("txtPassword1")
strNewPass = Request.Form("txtPassword2")

'Check the database to see if user exsits and read in there password
'Initialise the strAccessDB variable with the name of the Access Database
strAccessDB = "users"

'Create a connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")

'Database connection info and driver
'strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=lnets; DBQ=" & Server.MapPath(strAccessDB)
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("./users.mdb") & ";"

'Set an active connection to the Connection object
adoCon.Open strCon

'Create a recordset object
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
//strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "'"
strSQL = "SELECT tblUsers.UserID,tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "' AND tblUsers.Password ='" & strOldPass & " '"

'Query the database
rsCheckUser.Open strSQL, strCon

'If the recordset finds a record for the username entered then read in the password for the user
If NOT rsCheckUser.EOF Then

    'Read in the password for the user from the database
    //If (Request.Form("txtPassword1")) = rsCheckUser("Password") Then

     //strSQLupdate = "UPDATE tblUsers SET tblUsers.Password = ' " & strNewPass & " ' WHERE tblUsers.Password = ' " & strOldPass & " ' "
 //strCon.Execute strSQLupdate
 //strCon.execute("UPDATE tblUsers SET tblUsers.Password = ' " & strNewPass & " ' WHERE tblUsers.Password = " & Request.Form("txtPassword2"))

    rsCheckUser.Fields("Password")= strNewPass

        'Close Objects before redirecting
        Set adoCon = Nothing
        Set strCon = Nothing
        Set rsCheckUser = Nothing
       'Close Objects
        Set adoCon = Nothing
        Set strCon = Nothing
        Set rsCheckUser = Nothing

    //End If
End If

Thanks in advance.


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBScript runtime error '800a01a8' - FIXED buddyz Classic ASP Databases 2 September 13th, 2006 10:55 AM
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Basics 1 July 21st, 2006 11:43 AM
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Professional 1 July 21st, 2006 11:42 AM
Microsoft VBScript runtime error '800a01a8' gmoney060 BOOK: Beginning ASP 3.0 1 June 2nd, 2004 01:18 PM
Microsoft VBScript runtime error '800a01a8' dlgee Classic ASP Basics 4 January 25th, 2004 05:18 PM

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