import java.sql.*;
class callstore {
public static void main(String[] args){
try{
String driverStr = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
Class.forName(driverStr).newInstance();
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://61.28.18.53:1433;DatabaseName=SoutecInfoSale","sa","soutec");
CallableStatement st = conn.prepareCall("{call adduser(?,?)}");
// PreparedStatement st = conn.prepareCall("update SMS_Admin set PersonName = ? where PersonID = 'honeymoon'");
// PreparedStatement st = conn.prepareCall("{call test}");
// Statement st = conn.createStatement();
st.setString(1,"sssssssss");
st.setString(2,"honey");
// st.setString(3,"honey");
// st.setString(4,"000");
//String sql = "{call adduser(?,?)}";
//ResultSet rs = st.executeQuery(sql);
int i = st.executeUpdate();
//rs.next();
//System.out.println (rs.getString(5));
//rs.next();
// System.out.println (rs.getString(5));
}
catch(SQLException se){
System.out.println (se.getMessage());
se.printStackTrace();
}
catch(ClassNotFoundException cnf){
System.out.println (cnf.getMessage());
cnf.printStackTrace();
}
catch(InstantiationException ite){
System.out.println (ite.getMessage());
ite.printStackTrace();
}
catch(IllegalAccessException iae){
System.out.println (iae.getMessage());
iae.printStackTrace();
}
}
}