Website MS Access SQL Query: Too few parameters error

Soldato
Joined
5 Dec 2003
Posts
2,716
Location
Glasgow
Hey I am trying to run this query that works fine in MS Access but when I try to run it from a web page using ColdFusion and ODBC drivers it is giving this error:

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

Here is the code I am using:

Code:
<cfquery name="yourcourses" datasource="bigben">
SELECT courses.coursename, courses.credits, courses.signups
FROM users INNER JOIN (courses INNER JOIN usercourses ON courses.courseID = usercourses.courseid) ON users.username = usercourses.username
WHERE usercourses.username="#Session.username#";
</cfquery>

Anyone any ideas how to get this to work?
 
Make sure the #Session.username# is getting passed over, i usually get that error if a variable is getting lost along the way.
 
Back
Top Bottom