Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy sqlstmt problem??! Maybe... Hopefully...AHHHH

    I'm getting a
    "No value given for one or more required parameters."
    Any idea what this might be?
    The browser puts line 14 as the problem which is:
    "rs.open sqlstmt, conn" - see below

    <%
    Set Conn = Server.CreateObject("ADODB.Connection")
    FilePath = Server.MapPath("Taxes2004.mdb")
    Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FilePath & ";"
    set rs=Server.CreateObject("adodb.Recordset")
    sqlstmt = "SELECT DatabaseFields.SSN, DatabaseFields.FirstName, DatabaseFields.LastName, DatabaseFields.Address, DatabaseFields.State, DatabaseFields.City, DatabaseFields.EmailAddress, DatabaseFields.HomePhone, DatabaseFields.WorkPhone, DatabaseFields.WorkExtension, DatabaseFields.PostalCode, DatabaseFields.MobilePhone, DatabaseFields.Birthdate, DatabaseFields.Occupation, DatabaseFields.FilingStatus, Totals.SW2Total, Totals.NSW2Total, Totals.PayoutTotal, Totals.DepRefNumber, Totals.DepRefName, Totals.DepXFee, Totals.DepXChildSSN"
    sqlstmt = sqlstmt & " FROM DatabaseFields INNER JOIN Totals ON (DatabaseFields.SSN = Totals.SSN)"


    rs.open sqlstmt, conn
    If rs.eof then
    response.write "<center>There are no records in the database"
    response.write "<br>Please check back later</center>"
    Else
    %>

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    What are you field names in your database? I would check those, That error can come if you miss spell on of you field names in your select statement...

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    response.write the sql statement then paste the output in SQL View of Access then execute it to verify if the query works as expected. That is the basic procedure in debugging sql statements.


  •  

    Posting Permissions

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