Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10267
Modified Files:
DbMetadata.cs IDbMetadata.cs dbproviders.xml
Log Message:
SPRNET-750 - Add the property UseParameterPrefixInSql to IDbMetadata
Index: IDbMetadata.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/IDbMetadata.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** IDbMetadata.cs 13 Oct 2006 21:59:06 -0000 1.6
--- IDbMetadata.cs 11 Oct 2007 14:52:13 -0000 1.7
***************
*** 66,69 ****
--- 66,84 ----
bool UseParameterNamePrefixInParameterCollection { get; }
+
+ /// <summary>
+ /// Gets a value indicating whether the Provider requires
+ /// the use of a named prefix in the SQL string.
+ /// </summary>
+ /// <remarks>
+ /// The OLE DB/ODBC .NET Provider does not support named parameters for
+ /// passing parameters to an SQL Statement or a stored procedure called
+ /// by an IDbCommand when CommandType is set to Text.
+ /// </remarks>
+ /// <value>
+ /// <c>true</c> if use parameter prefix in SQL; otherwise, <c>false</c>.
+ /// </value>
+ bool UseParameterPrefixInSql { get; }
+
/// <summary>
/// For providers that allow you to choose between binding parameters
Index: dbproviders.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/dbproviders.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** dbproviders.xml 10 Oct 2007 20:59:22 -0000 1.21
--- dbproviders.xml 11 Oct 2007 14:52:13 -0000 1.22
***************
*** 28,31 ****
--- 28,32 ----
<constructor-arg name="exceptionType" value="System.Data.SqlClient.SqlException, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<constructor-arg name="errorCodeExceptionExpression" value="Errors[0].Number.ToString()"/>
***************
*** 66,69 ****
--- 67,71 ----
<constructor-arg name="exceptionType" value="System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 111,114 ****
--- 113,117 ----
<constructor-arg name="exceptionType" value="System.Data.SqlServerCe.SqlCeException, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 154,157 ****
--- 157,161 ----
<constructor-arg name="exceptionType" value="System.Data.OleDb.OleDbException, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="false"/>
+ <constructor-arg name="useParameterPrefixInSql" value="false"/>
<constructor-arg name="bindByName" value="false"/>
<!-- TODO should parse out high/low values in the native error...yuk!-->
***************
*** 194,197 ****
--- 198,202 ----
<constructor-arg name="exceptionType" value="System.Data.OleDb.OleDbException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="false"/>
+ <constructor-arg name="useParameterPrefixInSql" value="false"/>
<constructor-arg name="bindByName" value="false"/>
<!-- TODO should parse out high/low values in the native error...yuk!-->
***************
*** 240,243 ****
--- 245,249 ----
<constructor-arg name="exceptionType" value="System.Data.OracleClient.OracleException, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="false"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 286,289 ****
--- 292,296 ----
<constructor-arg name="exceptionType" value="Oracle.DataAccess.Client.OracleException, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="false"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 337,340 ****
--- 344,348 ----
<constructor-arg name="exceptionType" value="MySql.Data.MySqlClient.MySqlException, MySql.Data, Version=1.0.10.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 378,381 ****
--- 386,390 ----
<constructor-arg name="exceptionType" value="MySql.Data.MySqlClient.MySqlException, MySql.Data, Version=1.0.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 423,426 ****
--- 432,436 ----
<constructor-arg name="exceptionType" value="MySql.Data.MySqlClient.MySqlException, MySql.Data, Version=5.0.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 467,470 ****
--- 477,481 ----
<constructor-arg name="exceptionType" value="MySql.Data.MySqlClient.MySqlException, MySql.Data, Version=5.1.2.2, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 511,514 ****
--- 522,526 ----
<constructor-arg name="exceptionType" value="Npgsql.NpgsqlException, Npgsql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 554,557 ****
--- 566,570 ----
<constructor-arg name="exceptionType" value="IBM.Data.DB2.DB2Exception, IBM.Data.DB2, Version=9.0.0.1, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 595,598 ****
--- 608,612 ----
<constructor-arg name="exceptionType" value="IBM.Data.DB2.DB2Exception, IBM.Data.DB2, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 638,641 ****
--- 652,656 ----
<constructor-arg name="exceptionType" value="IBM.Data.DB2.DB2Exception, IBM.Data.DB2, Version=9.1.0.1, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 679,682 ****
--- 694,698 ----
<constructor-arg name="exceptionType" value="IBM.Data.DB2.DB2Exception, IBM.Data.DB2, Version=9.1.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 723,726 ****
--- 739,743 ----
<constructor-arg name="exceptionType" value="IBM.Data.DB2.iSeries.iDB2SQLErrorException, IBM.Data.DB2.iSeries, Version=10.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 768,771 ****
--- 785,789 ----
<constructor-arg name="exceptionType" value="System.Data.SQLite.SQLiteException, System.Data.SQLite, Version=1.0.43.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
***************
*** 813,816 ****
--- 831,835 ----
<constructor-arg name="exceptionType" value="System.Data.SQLite.SQLiteException, System.Data.SQLite, Version=1.0.44.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>
<constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/>
+ <constructor-arg name="useParameterPrefixInSql" value="true"/>
<constructor-arg name="bindByName" value="true"/>
<!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for
Index: DbMetadata.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/DbMetadata.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DbMetadata.cs 21 Aug 2007 19:25:49 -0000 1.11
--- DbMetadata.cs 11 Oct 2007 14:52:13 -0000 1.12
***************
*** 53,56 ****
--- 53,57 ----
private Type exceptionType;
private bool useParameterNamePrefixInParameterCollection;
+ private bool useParameterPrefixInSql;
private bool bindByName;
***************
*** 83,86 ****
--- 84,88 ----
Type exceptionType,
bool useParameterNamePrefixInParameterCollection,
+ bool useParameterPrefixInSql,
bool bindByName,
string errorCodeExceptionExpression
***************
*** 145,148 ****
--- 147,151 ----
this.useParameterNamePrefixInParameterCollection = useParameterNamePrefixInParameterCollection;
+ this.useParameterPrefixInSql = useParameterPrefixInSql;
this.bindByName = bindByName;
***************
*** 225,228 ****
--- 228,237 ----
}
+
+ public bool UseParameterPrefixInSql
+ {
+ get { return useParameterPrefixInSql; }
+ }
+
public bool BindByName
{
|