[pgsqlclient-checkins] SF.net SVN: pgsqlclient: [115] trunk/PostgreSqlClient/source/PostgreSql/Data/
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2006-04-13 22:33:24
|
Revision: 115 Author: carlosga_fb Date: 2006-04-13 15:33:18 -0700 (Thu, 13 Apr 2006) ViewCVS: http://svn.sourceforge.net/pgsqlclient/?rev=115&view=rev Log Message: ----------- Modified Paths: -------------- trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgParameter.cs Modified: trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgParameter.cs =================================================================== --- trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgParameter.cs 2006-04-13 22:29:39 UTC (rev 114) +++ trunk/PostgreSqlClient/source/PostgreSql/Data/PostgreSqlClient/PgParameter.cs 2006-04-13 22:33:18 UTC (rev 115) @@ -41,7 +41,7 @@ private byte scale; private int size; private PgDbType providerType; - private bool inferType; + private bool isTypeSet; private PgParameterCollection parent; #endregion @@ -86,7 +86,7 @@ public override DbType DbType { get { return this.PgDbTypeToDbType(this.providerType); } - set { this.providerType = this.DbTypeToPgType(value); } + set { this.PgDbType = this.DbTypeToPgType(value); } } [RefreshProperties(RefreshProperties.All)] @@ -95,7 +95,11 @@ public PgDbType PgDbType { get { return this.providerType; } - set { this.providerType = value; } + set + { + this.providerType = value; + this.isTypeSet = true; + } } [Category("Data")] @@ -144,8 +148,10 @@ { value = System.DBNull.Value; } - this.value = value; - if (this.inferType) + + this.value = value; + + if (!this.isTypeSet) { this.SetPgTypeFromValue(this.value); } @@ -178,28 +184,24 @@ this.sourceVersion = DataRowVersion.Current; this.isNullable = false; this.providerType = PgDbType.VarChar; - this.inferType = true; } public PgParameter(string parameterName, object value) : this() { - this.inferType = false; this.parameterName = parameterName; this.value = value; } public PgParameter(string parameterName, PgDbType dbType) : this() { - this.inferType = false; this.parameterName = parameterName; this.providerType = dbType; } public PgParameter(string parameterName, PgDbType dbType, int size) : this() { - this.inferType = false; this.parameterName = parameterName; - this.providerType = dbType; + this.PgDbType = dbType; this.size = size; } @@ -209,9 +211,8 @@ int size, string sourceColumn) : this() { - this.inferType = false; this.parameterName = parameterName; - this.providerType = dbType; + this.PgDbType = dbType; this.size = size; this.sourceColumn = sourceColumn; } @@ -229,9 +230,8 @@ DataRowVersion sourceVersion, object value) { - this.inferType = false; this.parameterName = parameterName; - this.providerType = dbType; + this.PgDbType = dbType; this.size = size; this.direction = direction; this.isNullable = isNullable; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |