public static void main(String[] args) {
// TODO Auto-generated method stub
......
CallableStatement cs=null;
cs = cnn.prepareCall("{call show(?,?)}");
cs.registerOutParameter(2,Types.VARCHAR);
cs.setString(1,"101");
cs.execute();
System.out.print("return="+cs.getString(2));
}
本文介绍了一个Java程序示例,演示了如何使用CallableStatement对象来调用数据库中的存储过程,并展示了设置输入参数及获取输出参数的过程。
753

被折叠的 条评论
为什么被折叠?



