I would like to know how i can pass String[] to function. To give a clearer idea i have to code below. I am using PostgreSQL 7.3.
Any help regarding this is appreciated.
Thanks in advance, Nagesh
class testArray { public static void main(String args[]) { test(); }
<code> static void test() {
String url = "jdbc:postgresql://myDB:5432/dbinstance"; String query="{call test_mohan(?)}"; Connection con = null; CallableStatement stmt=null; try { Class.forName("org.postgresql.Driver"); con=DriverManager.getConnection(url,"blah", "blah"); String string[]=new String[]{"hi","hello"}; //not sure how to use string array above and pass to setArray below or use another solution