aspose file tools*
The moose likes JDBC and the fly likes out of range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "out of range" Watch "out of range" New topic

out of range

D Ravi Kumar

Joined: Dec 11, 2008
Posts: 4

i got the these error

java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
at com.mysql.jdbc.PreparedStatement.setInternal(
at com.mysql.jdbc.PreparedStatement.setString(
at com.izmocars.inventory.homenet.Test.main(

give me solution

Ravi Kumar
[ December 11, 2008: Message edited by: Ulf Dittmer ]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39576
Welcome to JavaRanch.

You need to remove the quotation marks from the parameters. JDBC will automatically add those where necessary.

In the future, please UseCodeTags when posting code of any length. As it was, the code was basically unreadable.

(As an aside, I think you meant to say "please give me a solution".)

Ping & DNS - updated with new look and Ping home screen widget
D Ravi Kumar

Joined: Dec 11, 2008
Posts: 4
Simply change the below statement


your statement is

remove the "query"
It is sorta covered in the JavaRanch Style Guide.
subject: out of range
Similar Threads
assignment help
Help with used car program
variable in place of object?
java.lang.NoSuchMethodError for org.apache.poi.hssf.usermodel.HSSFPatriarch.createComment()