• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to insert the row with the ResultSet?

 
Oleg Vasylenko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got the Postgre database and table insdide



As You can see: 2 fields
id - it's an autofill field.

But when I try to insert the new Row in code putting under It generete the SQLException, that "id" filed was not found in ResultSet. But it mustn't be there as for me.
I created the id field with default value from the sequence


The Code is:



I don't want to make the ResultSet with both fields...
How to solve the problem?
Thanks.
[ January 10, 2007: Message edited by: Oleg Vasylenko ]
 
Alex Sotin
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What DB do you use ?
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oleg mentions that it is a
Postgre database
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!