• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PostgreSQL prepared statement failure

 
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: 2608
14
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