hi
I have added a stored procedure in mySQL database. that stored funstion just gets the input integer and gives with adding number 10.When I execute in mySQL promt that works fine. I tried
Java code to get the output. Here is the code. Here i got Exception like 'CallableStatements not Supported' . I dont know what is the problme here. Help me..
import java.sql.*;
import java.io.*;
public class proc
{
public static void main(
String a[])
{
try
{
Class.forName("org.gjt.mm.mysql.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/jobsearch?user=root&password=");
CallableStatement cs = con.prepareCall("{? = call pr(?)}");
cs.registerOutParameter(1,Types.INTEGER);
cs.setInt(1,5);
cs.execute();
System.out.println(cs.getInt(1));
} catch(Exception e){ System.out.println(e);}
}
}