From: <car...@us...> - 2006-03-11 15:05:45
|
Update of /cvsroot/firebird/NETProvider/NETProvider_20/source/FirebirdSql/Data/Client/Gds In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5518 Modified Files: GdsConnection.cs GdsStatement.cs Added Files: GdsSqlResponse.cs Log Message: 2006-03-11 Carlos Guzmán Álvarez <car...@te...> * More changes on Server Response handling. ( Added new class for the Stored Procedure Output response ) --- GdsSqlResponse.cs ADDED --- Index: GdsConnection.cs =================================================================== RCS file: /cvsroot/firebird/NETProvider/NETProvider_20/source/FirebirdSql/Data/Client/Gds/GdsConnection.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -b -U3 -r1.18 -r1.19 --- GdsConnection.cs 10 Mar 2006 19:24:19 -0000 1.18 +++ GdsConnection.cs 11 Mar 2006 15:05:40 -0000 1.19 @@ -190,6 +190,9 @@ case IscCodes.op_fetch_response: return new GdsFetchResponse(this.receive.ReadInt32(), this.receive.ReadInt32()); + case IscCodes.op_sql_response: + return new GdsSqlResponse(this.receive.ReadInt32()); + default: return null; } Index: GdsStatement.cs =================================================================== RCS file: /cvsroot/firebird/NETProvider/NETProvider_20/source/FirebirdSql/Data/Client/Gds/GdsStatement.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -b -U3 -r1.11 -r1.12 --- GdsStatement.cs 10 Mar 2006 19:24:19 -0000 1.11 +++ GdsStatement.cs 11 Mar 2006 15:05:40 -0000 1.12 @@ -353,7 +353,7 @@ if (this.db.NextOperation() == IscCodes.op_sql_response) { // This would be an Execute procedure - this.outputParams.Enqueue(this.ReceiveSqlResponse()); + this.outputParams.Enqueue(this.ReadStoredProcedureOutput()); } this.db.ReadResponse(); @@ -580,14 +580,15 @@ #region · Private Methods · - private DbValue[] ReceiveSqlResponse() + private DbValue[] ReadStoredProcedureOutput() { try { - if (this.db.ReadOperation() == IscCodes.op_sql_response) + IResponse response = this.db.ReadResponse(); + + if (response is GdsSqlResponse) { - int messages = this.db.Receive.ReadInt32(); - if (messages > 0) + if (((GdsSqlResponse)response).Count > 0) { return this.ReadDataRow(); } |