This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes MySQL Problem  !!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL Problem  !!!" Watch "MySQL Problem  !!!" New topic
Author

MySQL Problem !!!

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
I am using jdbcTemplate and while getting the value of the User I am getting an exception .... I am attaching my code snippet.....

The exception which is coming is as follows:




Please tell me the solution to this problem and tell me where i am going wrong.... Thanks in advance ...
Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
Perhaps the '?' parameter should be ?
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
I checked with ? also instead of '?' but its giving problem with it also ...
Bob Good
Ranch Hand

Joined: Jan 09, 2008
Posts: 86
The same exception or a different one?
Please post it...

You old one was this:
Parameter index out of range (1 > number of parameters, which is 0).
[ February 01, 2008: Message edited by: Bob Good ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MySQL Problem !!!