Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to retrieve value from autogenerated(oracle sequence) column in a servlet.

 
Bhardwaj Shweta
Ranch Hand
Posts: 36
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

In my servlet i want to retrieve values from my jsp form,however there is one column in my table (created using sequence )so that it can increment automatically .



Now what should i write for first column?
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I think you can either pass in null or you can omit the first placeholder [?] from the prepared statement. I'm sure one of these will work.

Sean
 
Bhardwaj Shweta
Ranch Hand
Posts: 36
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Sean Thanks
It worked when i replaced first placeholder with (seq_auto.nextval)

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic