求救JSP中如何调用SQLSERVER存储过程 求救JSP中如何调用SQLSERVER存储过程 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我一个项目中的源码,可供参考是调用sqlserver2000的存储过程con = DriverManager.getConnection(driverUrl, userName, password);call = con.prepareCall ("{ CALL SAVE_ANSWER (?,?,?,?,?,?) }");call.setString(1, userId);call.setInt(2, examId);call.setBytes(3, answers.getBytes());call.setTimestamp(4, new Timestamp(dt.getTime()));call.setInt(5, score);call.registerOutParameter (6, Types.INTEGER);call.execute();result = call.getInt(6); try{ int age = 39; string poetname = "dylan thomas"; callablestatement proc = connection.preparecall("{ call set_death_age(?, ?) }"); proc.setstring(1, poetname); proc.setint(2, age); cs.execute(); }catch (sqlexception 超链接跳转问题 map 中session.clear()问题 c:\users\用户名 里的用户名怎么修改,会用NetBeans的进来看看 iReport html中文乱码问题 如何将Byte[]保存成一个文件 比如.doc的文件? 怎样才能让servlet在服务器启动时载入? 严重问题????? 用jbuilder来写JSP,如果才能让代码自动缩进 ? 初学问题:连接oracle数据库时,报错!! jsp文章(帖子)访问率(阅读数)功能实现问题 JSP操作XML,删除节点问题 只有十分了,请大家帮帮忙,谢谢!
是调用sqlserver2000的存储过程con = DriverManager.getConnection(driverUrl, userName, password);
call = con.prepareCall ("{ CALL SAVE_ANSWER (?,?,?,?,?,?) }");
call.setString(1, userId);
call.setInt(2, examId);
call.setBytes(3, answers.getBytes());
call.setTimestamp(4, new Timestamp(dt.getTime()));
call.setInt(5, score);
call.registerOutParameter (6, Types.INTEGER);
call.execute();
result = call.getInt(6);
int age = 39; string poetname = "dylan thomas"; callablestatement proc = connection.preparecall("{ call set_death_age(?, ?) }"); proc.setstring(1, poetname); proc.setint(2, age); cs.execute(); }catch (sqlexception