|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
too few parameters expected 7
I get this error message when the script opens:
java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 7 this is the query <cfquery name="classList" datasource="connStudents" dbtype="ODBC"> SELECT a.fourDigts as four, a.firstName as fname, a.lastName as lname, a.email1, b.section, b.school, b.semester, b.class FROM Students a, records b WHERE b.section = FORM.section AND a.four = b.fourDigits AND a.fName = b.firstName AND a.lName = b.lastName ORDER BY lname,fname </cfquery> |
|
#2
|
|||
|
|||
|
hey bud, not sure which db you are using, but for most, it seems you got some type of sql syntax error. should you have some type of JOIN on A and B? Also, you may need to add the table name in your ORDER BY field names since the fields could be the same in both tables. Let us know what DB you are using and we might be able to help you out more. though CF is giving you the error, it is not a CF coding error but an error in your SQL statement.
|
|
#3
|
|||
|
|||
|
Should it not be like this:
AND a.fourDigits = b.fourDigits AND a.firstName = b.firstName AND a.lastName = b.lastName ? In general, joining tables based on string columns is not the best approach. Is there not some StudentID value that you can join on instead of the name? Sometimes there is no choice but if there's any way to avoid it you should try. You might try asking this in the SQL forum. This forum is really meant for ColdFusion questions.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums Last edited by kiteless : March 20th, 2005 at 11:28 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > too few parameters expected 7 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|