ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old March 19th, 2005, 10:51 PM
lanegood lanegood is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 7 lanegood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 38 m 30 sec
Reputation Power: 0
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>

Reply With Quote
  #2  
Old March 20th, 2005, 06:05 AM
mortisRider mortisRider is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 21 mortisRider User rank is Private First Class (20 - 50 Reputation Level)mortisRider User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 25 m 51 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old March 20th, 2005, 11:26 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,611 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 10 m 21 sec
Reputation Power: 53
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > too few parameters expected 7


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway