About getJdbcTemplate().update(..) yael, From http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/jdbc/core/JdbcTemplate.html , the method update clearly documented that if there is any error, there will be an exception thrown: DataAccessException. Catching that will signify errors. The return code from update means you have a successful run of the update. but the value w...
by Elite - Java文档中心 - 2008-06-25 14:25:42 阅读(4758) 回复(0)
摘自: http://topic.csdn.net/u/20080512/21/2440e437-02ad-41af-bda8-c9fba86c4e01.html set @asql="select count(id),sum(price) into @tclick,@todayTotalrom adnote where 1=1 "; prepare sqlstmt from @asql; execute sqlstmt; 你之后 select @tclick; 或者赋给一个OUT 变量就可以了。 如(摘自: http://jonllen.javaeye.com/blog/370343 ): #拼接查询总记录的sql语句 set v_sqlcounts = concat('select count...
用Mysqldb操作MYsql, 想update一个表,但是execute("update....")的返回值不够具体。 affect rows表示改变的记录数目,如果update相同的数据,即数据没有改变,则rtcode=0;这种情况容易与不存在相应的数据在DB里的情况混淆。有没有其他的办法可以分开这两种情况? 谢谢!
在sehll脚本中,有如下sql语句 select count(*) from A insert into B select * from A; 当上面的sql执行后,接下来处理上面的返回值,该怎么取啊 如select查询记录数,insert 插入的记录数?用shell怎么得到呢
有个脚本文件,内容大致如下: isql -Usa -P1111 -SSERV<update 表1 set 字段1=值1 where 条件 go insert 表2 values(......) go ! 如何知道update和insert操作是否成功?
在存储过程中能不能象在EC中那样判断sqlCODE的值? 比如 FOREACH SELECT FLD INTO SFLD FROM TABNAM WHERE XXX='1' IF sqlCA.sqlCODE <>; 0 THEN EXIT FOREACH END IF END FOREACH