View Full Version : sqlstmt problem??! Maybe... Hopefully...AHHHH

12-08-2004, 03:57 PM
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>"

12-09-2004, 01:49 AM
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...

12-09-2004, 05:07 AM
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.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum