You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by ro...@apache.org on 2005/05/16 06:22:17 UTC

svn commit: r170301 - /incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs

Author: roberto
Date: Sun May 15 21:22:16 2005
New Revision: 170301

URL: http://svn.apache.org/viewcvs?rev=170301&view=rev
Log:
~Updated C# DataMapper DefaultPreparedCommand.cs logging line (sqlParameter.DbType could be null)

Modified:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs?rev=170301&r1=170300&r2=170301&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs Sun May 15 21:22:16 2005
@@ -211,7 +211,14 @@
 
 						paramLogList.Append( parameterValue.ToString() );
 						paramLogList.Append( "], " );
-						typeLogList.Append( sqlParameter.DbType.ToString() );
+
+						// sqlParameter.DbType could be null (as with Npgsql)
+						// if PreparedStatementFactory did not find a dbType for the parameter in:
+						// line 225: "if (property.DbType.Length >0)"
+						// Use parameterCopy.DbType
+
+						//typeLogList.Append( sqlParameter.DbType.ToString() );
+						typeLogList.Append( parameterCopy.DbType.ToString() );
 						typeLogList.Append( ", " );
 						typeLogList.Append( parameterValue.GetType().ToString() );
 						typeLogList.Append( "], " );