[thelist] Select QRY problem
Jason Handby
jasonh at corestar.co.uk
Mon Mar 14 11:48:04 CST 2005
Hi Ron,
> 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:
> DetailsRecordSet.Open()
>
>
> 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:
>
> detailsID=Request.QueryString("dateID")
>
>
> 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.
Quite a likely cause is that your querystring parameter is empty. Try
assigning a quoted string to detailsID just before your query and see if it
works then.
Jason
More information about the thelist
mailing list