| 发表于:2007-04-27 19:44:40 楼主 |
存储过程为: create procedure updatevote(@vverygood bigint,@vgood bigint, @vgenenal bigint,@vbad bigint,@vverybad bigint ) as begin update product set v1=@vverygood,v2=@vgood,v3=@vgenenal,v4=@vbad, v5=@vverybad select * from product end go jsp中的调用方法如下: product是表名,v1--v5是字段名 callablestatement callablestatement = conn.preparecall( "{call updatevote(?,?,?,?,?)} "); callablestatement.setint(1,1); callablestatement.setint(2,1); callablestatement.setint(3,1); callablestatement.setint(4,1); callablestatement.setint(5,1); callablestatement.EXECuteupdate(); callablestatement.close(); 目的是把product表中的v1到v5的值设置为1 执行过程中没有错误报告,但数据没有写到数据库中。 如果在jsp中紧接着查看更新的记录,会有结果,但就是写入不到数据库中。 请各们帮忙,看看哪里出了问题,急需!!! |
|
|
|
|