New test.
[mono.git] / mcs / class / Mono.Data.SybaseClient / Mono.Data.SybaseClient / SybaseCommand.cs
index 850bce04e98b32d7116cc0425d321c12bc68b9da..ad31b479b1541418a74818d1e20f21ac6f469ded 100644 (file)
@@ -235,6 +235,7 @@ namespace Mono.Data.SybaseClient {
 
                private void Execute (CommandBehavior behavior, bool wantResults)
                {
+                       Tds.RecordsAffected = -1; 
                        TdsMetaParameterCollection parms = Parameters.MetaParameters;
                        if (preparedStatement == null) {
                                bool schemaOnly = ((CommandBehavior & CommandBehavior.SchemaOnly) > 0);
@@ -279,6 +280,7 @@ namespace Mono.Data.SybaseClient {
 
                        try {
                                Execute (CommandBehavior.Default, false);
+                               result = Tds.RecordsAffected;
                        }
                        catch (TdsTimeoutException e) {
                                throw SybaseException.FromTdsInternalException ((TdsInternalException) e);