Results 1 to 3 of 3

Thread: Execute SQL !!

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Montreal
    Posts
    59
    Helllo
    i get this error :
    No value given for one or more required parameters.
    /login.asp, line 26

    > Set RSlogin = oConn.Execute(sqlLogin)

    But i don't know how to resolv it !
    the connction work any idea ?
    My code :
    ------------------------------------------------------------

    <html>
    <Title>Téléchager: Carnet d'addresses 1.0.60</TITLE>
    <body text="#66FFFF" bgcolor="#000066" link="#FFFF00" vlink="#551A8B" alink="#FF0000">

    <%
    <!-- #include virtual="adovbs.inc" -->

    Dim oConn, sConnString
    Dim RSlogin
    Dim UserName
    Dim UserPass

    Set oConn = Server.CreateObject("ADODB.Connection")
    oConn.provider="Microsoft.Jet.OLEDB.4.0"
    oConn.open Server.Mappath("/User1.mdb")

    Set RSlogin = Server.CreateObject("ADODB.Recordset")

    UserName = Request.Form("uSERName")
    UserPass = Request.Form("uSERPass")

    sqlLogin = "SELECT * FROM Userlogin WHERE " & _
    "Username = '" & UserName & "' AND " & _
    "Password = '" & UserPass & "';"

    Set RSlogin = oConn.Execute(sqlLogin)

    If RSlogin.EOF Then
    Response.Redirect("Login.asp")
    Else
    UserID = RSlogin("UserID")
    End If

    Set RS = Nothing

    %>


    </html>

  2. #2
    Addicted Member
    Join Date
    Feb 2000
    Posts
    224
    <%
    <!-- #include virtual="adovbs.inc" -->

    Dim oConn, sConnString
    The Include Statement must be outside the ASP tags <% and %>
    On an ASP page an Include Statement must be like a HTML comment.That is...

    <!-- #include virtual="adovbs.inc" -->
    <%
    Dim oConn, sConnString


    If you can't pronounce my name, call me GURU

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    I believe "username" and "password" are MS Jet keywords. Try this:

    sqlLogin = "SELECT * FROM Userlogin WHERE " & _
    "[Username] = '" & UserName & "' AND " & _
    "[Password] = '" & UserPass & "';"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width