File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes PreparedStatement 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 "PreparedStatement" Watch "PreparedStatement" New topic
Author

PreparedStatement

Rashmi Reddy
Greenhorn

Joined: Oct 16, 2003
Posts: 19
Hi,
How do i set a String array i.e String[] in the prepared statement?
Thanks,
Rashmi
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You need a sperate '?' for each element in your array and then bind each String to the PreparedStatement individually.
Dave
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PreparedStatement
 
Similar Threads
Tech Word Game
date format with MS Access database
ResultSet to Array
WA #1.....word association
How to convert byte array into string array?