This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PostgreSQL prepared statement failure  RSS feed

 
John Blunket
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a prepared statement in my java code:



When I execute it, it throws an exception:
org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns: 0.

Whats happening?

John.
 
Jan Cumps
Bartender
Posts: 2628
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The placeholder is '?', not '$'.
 
John Blunket
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jan,
Thanks, what a fool I am!!

John.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Blunket, please check your private messages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!