jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes PrepareStatement Insert using field name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

PrepareStatement Insert using field name

vinod balaji
Ranch Hand

Joined: May 18, 2006
Posts: 84

Is it Possible to insert the value using the field , i couldnt find the suitable API for it

String Query = "Insert into tablename(GROUP_NAME,SOURCE) values (?,?)";

PreparedStatement ps = conn.prepareStatement(Query,Statement.RETURN_GENERATED_KEYS);
// Need something like the bekiw


Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Doubleposted: http://www.coderanch.com/t/439922/JDBC/Insert-into-PrepareStatement-Using-Field
Please stick to one topic. Please use message's edit button to edit message. Please do not use browser's back button for edit.
I agree. Here's the link: http://aspose.com/file-tools
subject: PrepareStatement Insert using field name
It's not a secret anymore!