diff options
author | Paul Oliver <[email protected]> | 2009-11-26 13:54:36 +0000 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2009-12-03 18:31:21 +0100 |
commit | 1a564f84da39a309e40353ae52f2bb4366268a1e (patch) | |
tree | b9d3d4337a02025ae6a61ffd508d9a2176051132 /lib/edoc/src/Makefile | |
parent | 84adefa331c4159d432d22840663c38f155cd4c1 (diff) | |
download | otp-1a564f84da39a309e40353ae52f2bb4366268a1e.tar.gz otp-1a564f84da39a309e40353ae52f2bb4366268a1e.tar.bz2 otp-1a564f84da39a309e40353ae52f2bb4366268a1e.zip |
SQL_NO_DATA and SQLSTATE 00000 indicate success for updates/deletes that affect no rows
I noticed the following when no rows were updated for an update statement:
4> odbc:param_query(Ref, "update tbadger set status = ? where
badger_id = ?", [{{sql_varchar,1},["R"]}, {sql_integer, [61111]}]).
{error,"No SQL-driver information available."}
5> odbc:param_query(Ref, "update tbadger set status = ? where
badger_id = ?", [{{sql_varchar,1},["R"]}, {sql_integer, [61]}]).
{updated,1}
The attached patch, which requires the ODBC patch from Andrew
Thompson, should fix it:
3> odbc:param_query(Ref, "update tbadger set status = ? where
badger_id = ?", [{{sql_varchar,1},["R"]}, {sql_integer, [61111]}]).
{updated,0}
4>
I've followed the advice given on MSDN
(http://msdn.microsoft.com/en-us/library/ms715424%28VS.85%29.aspx) and
checked for SQL_NO_DATA combined with SQLSTATE 000000
Diffstat (limited to 'lib/edoc/src/Makefile')
0 files changed, 0 insertions, 0 deletions