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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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
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:
subject: PrepareStatement Insert using field name
It's not a secret anymore!