Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

I face a New java.sql.SQLException  RSS feed

 
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
 
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.

 
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
Boost this thread!