I have a String Array in a java program. I am using jdbc driver to store data in MySql.
There is a reference variable "pstmt" that refers to a prepared statement
now I want to call the following method:
String [] items = {pen, ball, speaker, mic};
pstmt.setArray(1, ....);
where "items" refer to String array but the method setArray() takes java.sql.Array instead of String array.
So how can I convert the string array "items" to a java.sql.Array so that I can pass an argument in the above method call.