Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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
  #1 (permalink)  
Old March 11th, 2007, 02:04 AM
Registered User
 
Join Date: Mar 2007
Location: Dhaka, , Bangladesh.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript compilation (0x800A03F6)

Hey...asps experts out there...i'm a beginner in asp...and stuck in one error which i dont know how to solve, i've tried different ways but nothing seems to work, the code shows ...

Microsoft VBScript compilation (0x800A03F6)
Expected 'End'

and my code is...

Response.CacheControl="no-cache"
    Response.AddHeader "Pragma", "no-cache"
    Response.Expires=-1


    Dim uid
    Dim pwd

    uid=Request.Form("luser")

    if uid <> "" then
        pwd=Request.Form("lpass")


    Dim adoCon
    Dim rs
    Dim strSQL

    Ser adoCon=Server.CreateObject("ADODB.Connection")
    adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("userdb.mdb")
    //adoCon.Open "DSN=userdb"

    Set rs=Server.CreateObject("ADODB.Recordset")
    strSQL="SELECT * FROM userinfo WHERE username='uid'"
    rs.CursorType = 2
    rs.LockType = 3
    rs.Open strSQL, adoCon

If Not rs.EOF Then
        If strcmp (pwd,rs.Fields("pass").value,1) = 0 Then
            Session("luser")=uid
            Response.Redirect "Home.htm"
            Response.End
        Else
            Response.Redirect "Wrong.htm"
            Response.End
        End If
Else
    Response.Redirect "reg.htm"
    Response.End
End If


  #2 (permalink)  
Old March 12th, 2007, 07:33 AM
Authorized User
 
Join Date: Jan 2007
Location: , , India.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saurabhj Send a message via Yahoo to saurabhj
Default

Use this:

Response.CacheControl="no-cache"
    Response.AddHeader "Pragma", "no-cache"
    Response.Expires=-1


    Dim uid
    Dim pwd

    uid=Request.Form("luser")

    if uid <> "" then
        pwd=Request.Form("lpass")
    end if



    Dim adoCon
    Dim rs
    Dim strSQL

    Ser adoCon=Server.CreateObject("ADODB.Connection")
    adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("userdb.mdb")
    //adoCon.Open "DSN=userdb"

    Set rs=Server.CreateObject("ADODB.Recordset")
    strSQL="SELECT * FROM userinfo WHERE username='uid'"
    rs.CursorType = 2
    rs.LockType = 3
    rs.Open strSQL, adoCon

If Not rs.EOF Then
        If strcmp (pwd,rs.Fields("pass").value,1) = 0 Then
            Session("luser")=uid
            Response.Redirect "Home.htm"
            Response.End
        Else
            Response.Redirect "Wrong.htm"
            Response.End
        End If
Else
    Response.Redirect "reg.htm"
    Response.End
End If

-Saurabh


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript compilation (0x800A0400) pendemv Classic ASP Databases 1 September 1st, 2008 02:58 PM
Microsoft VBScript compilation (0x800A0401) dayang Classic ASP Basics 14 May 8th, 2008 02:16 AM
Microsoft VBScript compilation error karlzoe Classic ASP Databases 2 December 29th, 2004 10:44 AM
Microsoft VBScript compilation (0x800A0400) cnottingham Classic ASP Databases 2 February 12th, 2004 10:11 AM
Microsoft VBScript compilation (0x800A0414) samoiz Classic ASP Databases 2 February 10th, 2004 12:29 PM





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