diff --git a/doc/reference/src/dbprovider.xml b/doc/reference/src/dbprovider.xml index 024ad9b7..f0a553f7 100644 --- a/doc/reference/src/dbprovider.xml +++ b/doc/reference/src/dbprovider.xml @@ -16,7 +16,12 @@ * limitations under the License. */ --> - + DbProvider
@@ -59,10 +64,10 @@
IDbProvider and DbProviderFactory - The IDbProvider API is - shown below and should look familiar to anyone using .NET 2.0 data - providers. Note that Spring's DbProvider abstraction can be used on .NET - 1.1 in addition to .NET 2.0 + The IDbProvider API is shown below + and should look familiar to anyone using .NET 2.0 data providers. Note + that Spring's DbProvider abstraction can be used on .NET 1.1 in addition + to .NET 2.0 public interface IDbProvider { @@ -106,11 +111,11 @@ create the string for a IDataParameter.ParameterName, typically contained inside a IDataParameterCollection. - The class DbProviderFactory creates - IDbProvider instances given a provider name. The connection string - property will be used to set the IDbConnection returned by the factory if - present. The provider names, and corresponding database, currently - configured are listed below. + The class DbProviderFactory creates IDbProvider + instances given a provider name. The connection string property will be + used to set the IDbConnection returned by the factory if present. The + provider names, and corresponding database, currently configured are + listed below. @@ -183,11 +188,16 @@ - MySql-5.1.4 - (aliased to - MySql.Data.MySqlClient) MySQL, MySQL provider + MySql-5.1.4 - MySQL, MySQL provider 5.1.2.2 + + MySql-5.2.3 (aliased to + MySql.Data.MySqlClient) MySQL, MySQL provider + 5.2.3.0 + + Npgsql-1.0 - Postgresql provider 1.0.0.0 (and 1.0.0.1 - were build with same version info) @@ -257,6 +267,14 @@ + + If your exact version of the database provider is not listed, you + can pick the general provider name, i.e. + MySql.Data.MySqlClient, and then perform an assembly + redirect in App.config. This will often be sufficient to upgrade to + newer versions. + + An example using DbProviderFactory is shown below IDbProvider dbProvider = DbProviderFactory.GetDbProvider("System.Data.SqlClient"); @@ -266,14 +284,14 @@ assembly://Spring.Data/Spring.Data.Common/dbproviders.xml. Future additions to round out the database coverage are forthcoming. The current crude mechanism to add additional providers, or to apply any - standard Spring IApplicationContext - functionality, such as applying AOP advice, is to set the public static - property DBPROVIDER_ADDITIONAL_RESOURCE_NAME in - DbProviderFactory to a Spring resource location. - The default value is file://dbProviders.xml. (That isn't a - typo, there is a difference in case with the name of the embedded - resource). This crude mechanism will eventually be replaced with one based - on a custom configuration section in App.config/Web.config. + standard Spring IApplicationContext functionality, such + as applying AOP advice, is to set the public static property + DBPROVIDER_ADDITIONAL_RESOURCE_NAME in + DbProviderFactory to a Spring resource location. The + default value is file://dbProviders.xml. (That isn't a typo, + there is a difference in case with the name of the embedded resource). + This crude mechanism will eventually be replaced with one based on a + custom configuration section in App.config/Web.config. It may happen that the version number of an assembly you have downloaded is different than the one listed above. If it is a point @@ -417,9 +435,9 @@
UserCredentialsDbProvider - This UserCredentialsDbProvider will allow - you to change the username and password of a database connection at - runtime. The API contains the properties Username and + This UserCredentialsDbProvider will allow you + to change the username and password of a database connection at runtime. + The API contains the properties Username and Password which are used as the default strings representing the user and password in the connection string. You can then change the value of these properties in the connection string by @@ -466,18 +484,18 @@ This is often the case where the same schema is installed in separate databases for different clients. The MultiDelegatingDbProvider implements the - IDbProvider interface and provides an abstraction - to the multiple databases and can be used in DAO layer such that the DAO + IDbProvider interface and provides an abstraction to + the multiple databases and can be used in DAO layer such that the DAO layer is unaware of the switching between databases. MultiDelegatingDbProvider does its job by looking into thread local storage under the key dbProviderName. This storage location stores the name of the dbProvider that is to be used for - processing the request. MultiDelegatingDbProvider - is configured using the dictionary property + processing the request. MultiDelegatingDbProvider is + configured using the dictionary property TargetDbProviders. The key of this dictionary contains the name of a dbProvider and its value is a dbProvider object. - (You can also provide this dictionary as a constructor argument.) - + (You can also provide this dictionary as a constructor argument.) + During request processing, once you have determined which target dbProvider should be use, in this example database1ProviderName, you should execute the following code is you are using Spring 1.2 M1 or @@ -512,7 +530,6 @@ <object id="DbProvider" type="Spring.Data.MultiDelegatingDbProvider, Spring.Data"> <property name="TargetDbProviders" ref="dbProviderDictionary"/> </object> -
- \ No newline at end of file + diff --git a/src/Spring/Spring.Data/Data/Common/dbproviders.xml b/src/Spring/Spring.Data/Data/Common/dbproviders.xml index 374300ae..ba9a5e39 100644 --- a/src/Spring/Spring.Data/Data/Common/dbproviders.xml +++ b/src/Spring/Spring.Data/Data/Common/dbproviders.xml @@ -630,7 +630,49 @@ - + + + + + + + + + + + + + + + + + + + + + + + + 1054,1064,1146 + + + 1 + + + 630,839,840,893,1062,1169,1215,1216,1217,1451,1452,1557 + + + 1205 + + + 1213 + + + + + + diff --git a/src/Spring/Spring.Data/Data/Config/spring-database-1.1.xsd b/src/Spring/Spring.Data/Data/Config/spring-database-1.1.xsd index 3bce0c7d..5bfb3ec3 100644 --- a/src/Spring/Spring.Data/Data/Config/spring-database-1.1.xsd +++ b/src/Spring/Spring.Data/Data/Config/spring-database-1.1.xsd @@ -83,7 +83,7 @@ - MySQL provider 5.1.4.0 + MySQL provider 5.2.3.0