error while passing parameter to PL/SQL procedure
Hello ,
this is a method wich try to pass a string to simple PL/SQL stored procedure:
public static void call_AudStatscrutJOB(String objectName){
ResultSet ping = null;
boolean test1 = false;
// CallableStatement cstmt = null;
PreparedStatement cstmt = null;
float nb_statement=0;
TestConnection conn = new TestConnection();
Connection connection = null;
try{
connection=conn.connect();
if (connection != null)
{
cstmt = connection.prepareStatement("{call manage_pak.test2(?)}");
cstmt.setString(1,"EMP");
cstmt.addBatch();
cstmt.executeBatch();
}
else System.out.println("Connection closed");
}
catch (SQLException sqle) {sqle.printStackTrace();}
try{
if ( !connection.isClosed() )
{
connection.close();
}
}
catch (SQLException sqle) {sqle.printStackTrace();}
}
i've got this probleme when calling the procedure:
ORA-00911: caractère non valide
I try the same code without passing parameter, it works. I think the probleme is about the '?' caracter. Someone can help me please