class CallableDemo
{
public static void main(String s[])
{
try{
String name="sun";
String pwd="ktm";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:dsn7");
CallableStatement st=con.prepareCall("{call pselect1(?,?)}");
st.setString(1,"vinu");
st.registerOutParameter(2,Types.VARCHAR);
st.executeUpdate();
String status=st.getString(2);
System.out.println(status);
//con.close();
}catch(Exception e){System.out.println(e);}
}
} Labels: Java
Responses
0 Respones to "CallableStatement"
Post a Comment