[thelist] Select QRY problem

Ken Schaefer Ken at adOpenStatic.com
Mon Mar 14 19:48:23 CST 2005


www.adopenstatic.com/faq/80040e10.asp

Suggest you do a:

Response.Write(detailsID)
Response.End

Just before you attempt to execute the SQL statement. Additionally, I suggest
you incorporate some kind of input validation:
www.adopenstatic.com/resources/code/UIValidation.asp

Cheers
Ken

: -----Original Message-----
: From: thelist-bounces at lists.evolt.org [mailto:thelist-
: bounces at lists.evolt.org] On Behalf Of Pringle, Ron
: Sent: Tuesday, 15 March 2005 3:32 AM
: To: theList (E-mail)
: Subject: [thelist] Select QRY problem
: 
: 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.
: 
: Regards,
: Ron


More information about the thelist mailing list