• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I face a New java.sql.SQLException

 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i use the below code it shows an weird error that i was not know before.
And here is my code....



And err here is the error
-------------------------


where the 201st line of RMAEntryModel is ps.setDate(1,da);

what should i do with...

Any help would be appreciated
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Parameter index out of range (1>0)

You are using a PreparedStatement but have not set any bind parameters. All your set methods have no where to bind their values.

To use PreparedStatements, you need to supply placeholders for the various set methods you call to bind their values. FOr example:

[ June 19, 2008: Message edited by: Paul Sturrock ]
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul Sturrock,

Now i cleared the error.Thanks for your help. Now i inserted the null values in my table. I have to move onto the next step of the project.

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
beerchug to you too
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic