[thelist] Select QRY problem

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Mon Mar 14 12:37:22 CST 2005

   When this happens, the first thing to do is to response.write the SQL statement so you can see what it's really saying to the DB.  Chances are you have an empty "detailsID" parameter.

From: "Pringle, Ron" RPringle at aurora-il.org

I'm using VBScript and Access 2000.

I'm trying to select a specific record from my DB and am getting the
following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

detail.asp, line 31

Line 31 is:

My SQL Query is:

DetailsRecordSet.Source = "SELECT * FROM (((tbl_event EV INNER JOIN
tbl_eventDates ED ON EV.eventID = ED.eventID) LEFT OUTER JOIN tbl_contact C
ON EV.eventID = C.eventID) INNER JOIN tbl_link L ON EV.eventID = L.eventID)
LEFT OUTER JOIN tbl_icon I ON EV.eventType = I.eventType WHERE
tbl_eventDates.dateID = " & detailsID & ""

The detailsID is passed from a querystring:


I removed all the joins and did a simple query on just the eventDates table
and it works fine, so I'm assuming my joins are fubared and that its not
returning any records. However, I use the same join statement in another
query that pages the resulting recordset and it works fine.

Any help would be appreciated.


More information about the thelist mailing list