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/06 03:32:31 UTC

svn commit: r168488 - /incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs

Author: roberto
Date: Thu May  5 18:32:29 2005
New Revision: 168488

URL: http://svn.apache.org/viewcvs?rev=168488&view=rev
Log:
~Updated C# DataMapper PreparedStatementFactory.cs for fix (both OracleClient and ODP providers affected) to change in SVN 168300

Modified:
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs?rev=168488&r1=168487&r2=168488&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs Thu May  5 18:32:29 2005
@@ -302,15 +302,27 @@
 					{
 						dataParameter = (IDataParameter) _propertyDbParameterMap[property];
 						
-						// Fix ByteFX.Data.MySqlClient.MySqlParameter
-						// who strip prefix in Parameter Name ?!
-						if (_session.DataSource.Provider.Name.IndexOf("ByteFx")>=0)
+						// 5 May 2004
+						// Need to check UseParameterPrefixInParameter here 
+						// since CreateParametersForStatementText now does
+						// a check for UseParameterPrefixInParameter before 
+						// creating the parameter name!
+						if (_session.DataSource.Provider.UseParameterPrefixInParameter) 
 						{
-							sqlParamName = _parameterPrefix+dataParameter.ParameterName;
+							// Fix ByteFX.Data.MySqlClient.MySqlParameter
+							// who strip prefix in Parameter Name ?!
+							if (_session.DataSource.Provider.Name.IndexOf("ByteFx")>=0)
+							{
+								sqlParamName = _parameterPrefix+dataParameter.ParameterName;
+							}
+							else
+							{
+								sqlParamName = dataParameter.ParameterName;
+							}
 						}
 						else
 						{
-							sqlParamName = dataParameter.ParameterName;
+							sqlParamName = _parameterPrefix+dataParameter.ParameterName;
 						}
 					}