my dog learned polymorphism*
The moose likes JDBC and the fly likes how to retrieve value from autogenerated(oracle sequence) column in a servlet. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to retrieve value from autogenerated(oracle sequence) column in a servlet." Watch "how to retrieve value from autogenerated(oracle sequence) column in a servlet." New topic
Author

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

Bhardwaj Shweta
Ranch Hand

Joined: Mar 29, 2011
Posts: 36

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?


Regards,
Shweta Bhardwaj
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

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


I love this place!
Bhardwaj Shweta
Ranch Hand

Joined: Mar 29, 2011
Posts: 36

Hey Sean Thanks
It worked when i replaced first placeholder with (seq_auto.nextval)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to retrieve value from autogenerated(oracle sequence) column in a servlet.
 
Similar Threads
String == operator
comparing Strings
String confusion
Can anyone explain what is == and equal( ) ?
equals versus ==