SQL_NO_DATA and SQLSTATE 00000 indicate success for updates/deletes that affect no rows
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

platinumthinker/otp,falkevik/otp,saleyn/otp,RJ/otp,awetzel/otp,dgud/otp,schlagert/otp,sitexa/otp,jinshana/otp,basho/otp,RaimoNiskanen/otp,basho/otp,RichMorin/otp,sammoth-wazoku/otp,theom/otp,bsmr-erlang/otp,release-project/otp,RichMorin/otp,paladim/otp,vladdu/otp,rlipscombe/otp,GinjaNinja32/otp,gjaldon/otp,goertzenator/otp,sdebnath/otp,g-andrade/otp,getong/otp,aboroska/otp,benoitc/otp-1,RoadRunnr/otp,cnbin/otp,emile/otp,lightcyphers/otp,lantti/otp,falkevik/otp,uabboli/otp,jj1bdx/otp,vic/otp,fenollp/otp,haguenau/otp,bjorng/otp,mikpe/otp,paladim/otp,lhslll/otp,entropiae/otp,schlagert/otp,GinjaNinja32/otp,krishnakumar4a4/otp,g-andrade/otp,awetzel/otp,lrascao/otp,msantos/otp,lhslll/otp,palas/otp,lianghaivv/otp,emacsmirror/erlang,marquisthunder/otp,sdebnath/otp,bernardd/otp,haguenau/otp,sammoth-wazoku/otp,weisslj/otp,vic/otp,ferd/otp,ahmedshafeeq/otp,kvakvs/otp,jinshana/otp,jamesruan/otp,vinoski/otp,lemenkov/otp,kvakvs/otp,saleyn/otp,release-project/otp,paulcager/otp,lucafavatella/otp,RaimoNiskanen/otp,Teino1978-Corp/otp,ferd/otp,bernardd/otp,emacsmirror/erlang,cobusc/otp,fenollp/otp,g-andrade/otp,benoitc/otp-1,rlipscombe/otp,massemanet/otp,derek121/otp,legoscia/otp,paulcager/otp,krishnakumar4a4/otp,potatosalad/otp,tuncer/otp,schlagert/otp,tuncer/otp,dgud/otp,getong/otp,msantos/otp,release-project/otp,lianghaivv/otp,bernardd/otp,GinjaNinja32/otp,fenollp/otp,vinoski/otp,stolen/otp,GinjaNinja32/otp,uabboli/otp,basho/otp,basho/otp,gjaldon/otp,isvilen/otp,vic/otp,stolen/otp,ader1990/otp,release-project/otp,erlang/otp,ader1990/otp,vic/otp,Teino1978-Corp/erlang-otp,palas/otp,sitexa/otp,palas/otp,jemsbhai/otp,lemenkov/otp,legoscia/otp,ahmedshafeeq/otp,kvakvs/otp,VincentHHL/otp,falkevik/otp,lianghaivv/otp,goertzenator/otp,haguenau/otp,cobusc/otp,bugs-erlang-org/otp,basho/otp,vladdu/otp,vladdu/otp,lrascao/otp,bernardd/otp,lemenkov/otp,erlang/otp,vinoski/otp,getong/otp,theom/otp,rlipscombe/otp,palas/otp,bsmr-erlang/otp,ader1990/otp,enikki/otp,bsmr-erlang/otp,electricimp/otp,legoscia/otp,platinumthinker/otp,johanclaesson/otp,yangchengjian/otp,mikpe/otp,sitexa/otp,schlagert/otp,lucafavatella/otp,bugs-erlang-org/otp,krishnakumar4a4/otp,electricimp/otp,vladdu/otp,NOMORECOFFEE/otp,platinumthinker/otp,ader1990/otp,RGafiyatullin/otp,potatosalad/otp,awetzel/otp,ahmedshafeeq/otp,GinjaNinja32/otp,bjorng/otp,massemanet/otp,weisslj/otp,electricimp/otp,aboroska/otp,getong/otp,RoadRunnr/otp,psyeugenic/otp,basho/otp,emacsmirror/erlang,johanclaesson/otp,cnbin/otp,RoadRunnr/otp,lemenkov/otp,ferd/otp,erlang/otp,g-andrade/otp,palas/otp,erlang/otp,beni55/otp,legoscia/otp,rlipscombe/otp,hairyhum/otp,NOMORECOFFEE/otp,vladdu/otp,jinshana/otp,paulcager/otp,enikki/otp,electricimp/otp,rlipscombe/otp,jemsbhai/otp,enikki/otp,jamesruan/otp,bsmr-erlang/otp,isvilen/otp,RaimoNiskanen/otp,neeraj9/otp,beni55/otp,psyeugenic/otp,RaimoNiskanen/otp,aboroska/otp,jj1bdx/otp,erlang/otp,entropiae/otp,entropiae/otp,enikki/otp,RoadRunnr/otp,fenollp/otp,tuncer/otp,jemsbhai/otp,sdebnath/otp,Teino1978-Corp/otp,fenollp/otp,massemanet/otp,psyeugenic/otp,lucafavatella/otp,bugs-erlang-org/otp,falkevik/otp,bjorng/otp,schlagert/otp,bsmr-erlang/otp,lantti/otp,entropiae/otp,release-project/otp,msantos/otp,lrascao/otp,jamesruan/otp,lightcyphers/otp,cnbin/otp,emile/otp,ferd/otp,matwey/otp,matwey/otp,marquisthunder/otp,cobusc/otp,c-rack/otp,g-andrade/otp,VincentHHL/otp,mikpe/otp,msantos/otp,neeraj9/otp,sdebnath/otp,weisslj/otp,RGafiyatullin/otp,gjaldon/otp,matwey/otp,ahmedshafeeq/otp,hairyhum/otp,lucafavatella/otp,dumbbell/otp,jamesruan/otp,awetzel/otp,hairyhum/otp,dgud/otp,krishnakumar4a4/otp,getong/otp,jamesruan/otp,bugs-erlang-org/otp,vladdu/otp,psyeugenic/otp,schlagert/otp,getong/otp,aboroska/otp,platinumthinker/otp,lemenkov/otp,electricimp/otp,lianghaivv/otp,dumbbell/otp,paladim/otp,electricimp/otp,uabboli/otp,johanclaesson/otp,dumbbell/otp,lrascao/otp,paulcager/otp,massemanet/otp,lucafavatella/otp,derek121/otp,falkevik/otp,RGafiyatullin/otp,massemanet/otp,RGafiyatullin/otp,weisslj/otp,msantos/otp,tuncer/otp,tuncer/otp,legoscia/otp,riverrun/otp,kvakvs/otp,erlang/otp,bjorng/otp,ader1990/otp,bjorng/otp,emile/otp,beni55/otp,paulcager/otp,potatosalad/otp,Teino1978-Corp/otp,sammoth-wazoku/otp,NOMORECOFFEE/otp,saleyn/otp,hairyhum/otp,hairyhum/otp,cobusc/otp,lrascao/otp,riverrun/otp,vic/otp,klarna/otp,VincentHHL/otp,erlang/otp,benoitc/otp-1,stolen/otp,c-rack/otp,entropiae/otp,emile/otp,jamesruan/otp,NOMORECOFFEE/otp,bjorng/otp,lightcyphers/otp,benoitc/otp-1,theom/otp,lemenkov/otp,mujiatong/otp,GinjaNinja32/otp,goertzenator/otp,isvilen/otp,vladdu/otp,jinshana/otp,sammoth-wazoku/otp,sammoth-wazoku/otp,mikpe/otp,psyeugenic/otp,Teino1978-Corp/erlang-otp,johanclaesson/otp,fenollp/otp,cnbin/otp,erlang/otp,jamesruan/otp,vinoski/otp,potatosalad/otp,basho/otp,RaimoNiskanen/otp,lhslll/otp,RichMorin/otp,dumbbell/otp,potatosalad/otp,paladim/otp,getong/otp,cnbin/otp,theom/otp,getong/otp,release-project/otp,electricimp/otp,beni55/otp,platinumthinker/otp,release-project/otp,ahmedshafeeq/otp,sammoth-wazoku/otp,entropiae/otp,VincentHHL/otp,RoadRunnr/otp,jj1bdx/otp,lhslll/otp,ferd/otp,paladim/otp,jj1bdx/otp,weisslj/otp,NOMORECOFFEE/otp,RichMorin/otp,klarna/otp,cobusc/otp,ader1990/otp,riverrun/otp,emile/otp,yangchengjian/otp,klarna/otp,lightcyphers/otp,derek121/otp,VincentHHL/otp,hairyhum/otp,potatosalad/otp,gjaldon/otp,aboroska/otp,beni55/otp,bjorng/otp,jinshana/otp,paulcager/otp,sitexa/otp,fenollp/otp,stolen/otp,bjorng/otp,Teino1978-Corp/otp,vinoski/otp,platinumthinker/otp,enikki/otp,mikpe/otp,krishnakumar4a4/otp,enikki/otp,platinumthinker/otp,jj1bdx/otp,jj1bdx/otp,lantti/otp,yangchengjian/otp,isvilen/otp,isvilen/otp,RaimoNiskanen/otp,gjaldon/otp,basho/otp,Teino1978-Corp/erlang-otp,yangchengjian/otp,rlipscombe/otp,riverrun/otp,sitexa/otp,jemsbhai/otp,getong/otp,Teino1978-Corp/erlang-otp,goertzenator/otp,electricimp/otp,psyeugenic/otp,goertzenator/otp,benoitc/otp-1,platinumthinker/otp,vic/otp,matwey/otp,matwey/otp,lrascao/otp,getong/otp,mikpe/otp,lianghaivv/otp,emacsmirror/erlang,saleyn/otp,lhslll/otp,aboroska/otp,jinshana/otp,saleyn/otp,RJ/otp,emacsmirror/erlang,matwey/otp,RGafiyatullin/otp,palas/otp,dgud/otp,g-andrade/otp,falkevik/otp,Teino1978-Corp/otp,g-andrade/otp,bernardd/otp,beni55/otp,isvilen/otp,benoitc/otp-1,kvakvs/otp,sitexa/otp,neeraj9/otp,fenollp/otp,lightcyphers/otp,klarna/otp,tuncer/otp,stolen/otp,c-rack/otp,yangchengjian/otp,fenollp/otp,dgud/otp,vinoski/otp,ahmedshafeeq/otp,vinoski/otp,cnbin/otp,johanclaesson/otp,dgud/otp,tuncer/otp,jinshana/otp,riverrun/otp,RoadRunnr/otp,jj1bdx/otp,GinjaNinja32/otp,gjaldon/otp,vic/otp,theom/otp,isvilen/otp,lantti/otp,uabboli/otp,RGafiyatullin/otp,NOMORECOFFEE/otp,RJ/otp,sammoth-wazoku/otp,paulcager/otp,neeraj9/otp,emile/otp,msantos/otp,hairyhum/otp,RJ/otp,saleyn/otp,NOMORECOFFEE/otp,RichMorin/otp,marquisthunder/otp,Teino1978-Corp/erlang-otp,emile/otp,lhslll/otp,RJ/otp,ahmedshafeeq/otp,c-rack/otp,saleyn/otp,c-rack/otp,vic/otp,entropiae/otp,riverrun/otp,matwey/otp,krishnakumar4a4/otp,emacsmirror/erlang,sdebnath/otp,mujiatong/otp,isvilen/otp,bsmr-erlang/otp,bugs-erlang-org/otp,krishnakumar4a4/otp,haguenau/otp,lhslll/otp,lantti/otp,RaimoNiskanen/otp,erlang/otp,RoadRunnr/otp,haguenau/otp,ader1990/otp,tuncer/otp,matwey/otp,riverrun/otp,palas/otp,legoscia/otp,sitexa/otp,bernardd/otp,RichMorin/otp,sdebnath/otp,palas/otp,erlang/otp,jj1bdx/otp,haguenau/otp,lucafavatella/otp,derek121/otp,lemenkov/otp,jamesruan/otp,dumbbell/otp,c-rack/otp,msantos/otp,mujiatong/otp,psyeugenic/otp,marquisthunder/otp,marquisthunder/otp,jj1bdx/otp,Teino1978-Corp/otp,weisslj/otp,bugs-erlang-org/otp,cobusc/otp,uabboli/otp,haguenau/otp,basho/otp,dgud/otp,entropiae/otp,ferd/otp,schlagert/otp,c-rack/otp,GinjaNinja32/otp,lrascao/otp,mikpe/otp,beni55/otp,weisslj/otp,bsmr-erlang/otp,johanclaesson/otp,dumbbell/otp,g-andrade/otp,lrascao/otp,massemanet/otp,massemanet/otp,bernardd/otp,bsmr-erlang/otp,ahmedshafeeq/otp,RJ/otp,legoscia/otp,rlipscombe/otp,klarna/otp,dumbbell/otp,paulcager/otp,RGafiyatullin/otp,johanclaesson/otp,mikpe/otp,potatosalad/otp,krishnakumar4a4/otp,derek121/otp,dgud/otp,rlipscombe/otp,benoitc/otp-1,sammoth-wazoku/otp,uabboli/otp,emacsmirror/erlang,emacsmirror/erlang,release-project/otp,dumbbell/otp,saleyn/otp,rlipscombe/otp,RichMorin/otp,VincentHHL/otp,VincentHHL/otp,bugs-erlang-org/otp,jemsbhai/otp,weisslj/otp,hairyhum/otp,bjorng/otp,riverrun/otp,marquisthunder/otp,vinoski/otp,mujiatong/otp,VincentHHL/otp,marquisthunder/otp,derek121/otp,dgud/otp,weisslj/otp,lianghaivv/otp,stolen/otp,mujiatong/otp,falkevik/otp,rlipscombe/otp,NOMORECOFFEE/otp,Teino1978-Corp/erlang-otp,uabboli/otp,RaimoNiskanen/otp,haguenau/otp,paladim/otp,uabboli/otp,yangchengjian/otp,uabboli/otp,gjaldon/otp,release-project/otp,mujiatong/otp,Teino1978-Corp/otp,mujiatong/otp,g-andrade/otp,matwey/otp,theom/otp,marquisthunder/otp,ahmedshafeeq/otp,ferd/otp,derek121/otp,c-rack/otp,benoitc/otp-1,theom/otp,gjaldon/otp,falkevik/otp,paladim/otp,isvilen/otp,yangchengjian/otp,jj1bdx/otp,enikki/otp,mikpe/otp,lightcyphers/otp,goertzenator/otp,RGafiyatullin/otp,jemsbhai/otp,bernardd/otp,Teino1978-Corp/erlang-otp,lightcyphers/otp,neeraj9/otp,Teino1978-Corp/erlang-otp,lucafavatella/otp,schlagert/otp,sdebnath/otp,bugs-erlang-org/otp,ader1990/otp,klarna/otp,RJ/otp,mikpe/otp,emacsmirror/erlang,jemsbhai/otp,lemenkov/otp,potatosalad/otp,paladim/otp,cobusc/otp,lightcyphers/otp,aboroska/otp,derek121/otp,neeraj9/otp,legoscia/otp,jemsbhai/otp,yangchengjian/otp,awetzel/otp,kvakvs/otp,vinoski/otp,ferd/otp,cobusc/otp,vladdu/otp,massemanet/otp,beni55/otp,msantos/otp,dgud/otp,lhslll/otp,lucafavatella/otp,awetzel/otp,massemanet/otp,dumbbell/otp,electricimp/otp,goertzenator/otp,lrascao/otp,enikki/otp,tuncer/otp,klarna/otp,kvakvs/otp,stolen/otp,awetzel/otp,klarna/otp,g-andrade/otp,awetzel/otp,falkevik/otp,vinoski/otp,goertzenator/otp,vladdu/otp,potatosalad/otp,saleyn/otp,cnbin/otp,lantti/otp,isvilen/otp,potatosalad/otp,RoadRunnr/otp,bernardd/otp,ferd/otp,jinshana/otp,mujiatong/otp,RoadRunnr/otp,neeraj9/otp,stolen/otp,emacsmirror/erlang,RaimoNiskanen/otp,goertzenator/otp,emile/otp,lianghaivv/otp,aboroska/otp,kvakvs/otp,bjorng/otp,theom/otp,sdebnath/otp,cnbin/otp,neeraj9/otp,RichMorin/otp,kvakvs/otp,emile/otp,lantti/otp,johanclaesson/otp,Teino1978-Corp/otp,lantti/otp,legoscia/otp,psyeugenic/otp,dumbbell/otp,sitexa/otp,aboroska/otp,lianghaivv/otp,bsmr-erlang/otp,RJ/otp