#include "WorkingDialog.h" int SaGetAffectedRowCount();
SaGetAffectedRowCount
returns the last affected row count for an object binding and works for all DSQL Objects including those that perform Select, Insert, Update and Delete.It also returns the number of rows selected in a query for a Stored Procedure. Its value is not valid for Insert, Update and Delete.
Depending upon its use, SaGetAffectedRowCount
returns the number of rows selected in the last select statement for Sybase Stored Procedures which have multiple result groups.
To create a conditional binding:
/* In the "After Object Binding Execution Code" window */ printf("%d", SaGetAffectedRowCount());
For bind 2 ("no results"): /* Before Object Binding Execution Code */ if (SaGetAffectedRowCount() = 0) { /* After Object Binding Execution Code */ } For bind 3 ("success"): /* Before Object Binding Execution Code */ if (SaGetAffectedRowCount() >= 1) { /* After Object Binding Execution Code */ }