MySQL

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesMySQL

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 Tutorialized Forums Sponsor:
  #1  
Old March 20th, 2014, 10:45 PM
ppz ppz is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Mar 2014
Posts: 1 ppz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 22 sec
Reputation Power: 0
Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.

I'm getting the above error when the user searches for a particular contact name. I have 4 tables viz.
**Section**(Section_Name,Section_ID)
,**Report**(Report_Name,Report_ID,Section_ID,Conta ct_ID,ZipFile_IND,Last_Updated,Link,link_id),
**Contact**(Contact_Name,Contact_ID,link_id),
**Metrics**(Metric_Name,Metric_ID,Segment _ID, Report_ID, ZipFile_IND, Report_ID_ZIP, Metric_Def, Metric_ Segment,link_id)

Now, the user basically searches for a contact_name and on successful search, the following details should get printed:-
**Section.Section_Name , Report.Report_Name , Report.Link, Contact.Contact_Name, Metrics.Metric_Name**



my sql query is :-
sqlq="select Section.Section_Name , Report.Report_Name , Report.Link, Contact.Contact_Name, Metrics.Metric_Name "
+ "FROM Section , Report , Contact, Metrics"
+ " WHERE Report.Section_ID=Section.Section_ID and Metrics.Report_ID=Report.Report_ID "
+ "and Report.Report_ID IN (SELECT Report.Report_ID FROM Report WHERE "
+ "Contact.Contact_ID=Report.Contact_ID and Contact.Contact_Name LIKE '%"+category+"%' and Metrics.Metric_Segment = 'M') ORDER BY Report_Name ";

So, where is the error in the sqlquery ?

Last edited by ppz : March 20th, 2014 at 10:47 PM.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMySQL > Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.


Developer Shed Advertisers and Affiliates


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 | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap