[pgsqlclient-checkins] SF.net SVN: pgsqlclient: [140] trunk/PostgreSqlClient/source/PostgreSql/Data/
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2006-05-18 11:37:04
|
Revision: 140 Author: carlosga_fb Date: 2006-05-18 04:36:55 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pgsqlclient/?rev=140&view=rev Log Message: ----------- 2006-05-18 Carlos Guzman Alvarez (car...@gm...) * Fixed bug on parameters collection references on file PgCommand.cs ( Thanks to Alexander Tyaglov for his feedback ) Modified Paths: -------------- trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs Modified: trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs =================================================================== --- trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs 2006-05-17 17:34:26 UTC (rev 139) +++ trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgCommand.cs 2006-05-18 11:36:55 UTC (rev 140) @@ -152,6 +152,7 @@ { this.parameters = new PgParameterCollection(); } + return this.parameters; } } @@ -507,9 +508,9 @@ internal void InternalSetOutputParameters() { if (this.CommandType == CommandType.StoredProcedure && - this.parameters.Count > 0) + this.Parameters.Count > 0) { - IEnumerator paramEnumerator = this.parameters.GetEnumerator(); + IEnumerator paramEnumerator = this.Parameters.GetEnumerator(); int i = 0; if (this.statement.Rows != null && this.statement.Rows.Length > 0) @@ -582,15 +583,15 @@ paramsText.Append(commandText); paramsText.Append("("); - for (int i = 0; i < this.parameters.Count; i++) + for (int i = 0; i < this.Parameters.Count; i++) { - if (this.parameters[i].Direction == ParameterDirection.Input || - this.parameters[i].Direction == ParameterDirection.InputOutput) + if (this.Parameters[i].Direction == ParameterDirection.Input || + this.Parameters[i].Direction == ParameterDirection.InputOutput) { // Append parameter name to parameter list - paramsText.Append(this.parameters[i].ParameterName); + paramsText.Append(this.Parameters[i].ParameterName); - if (i != this.parameters.Count - 1) + if (i != this.Parameters.Count - 1) { paramsText = paramsText.Append(","); } @@ -608,7 +609,7 @@ private string GetStmtName() { - return GetHashCode().ToString() + this.connection.GetHashCode().ToString() + DateTime.Now.Ticks; + return Guid.NewGuid().ToString(); } private string ParseNamedParameters(string sql) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |