connection.multiple_query_separator ?
How many new configuration parameters we will have ?
"Welcome to the world of options. Welcome to NHibernate 3!" ;-)
DbProviderFactory has some problems with ODP.NET: if you want to
have named parameters, you have to set the BindByName property on the
OracleConnection. This is a property on the class provider by ODP.NET, not
in DbConnection. I've to check, but if memory serves me correctly, there's
also a problem with Sybase ASA.
So in short, even if you use DbProviderFactory, you need some
reflection to use it.
FB
I know reflection is ok, you already have it ;). I just pointed to a
problem you might run into when going for dbproviderfactory. Easy
deployment: dbproviderfactory is supported by all ADO.NET 2.0+ providers, so
if you support dbproviderfactory, it's always going to work. There's 1
caveat: not all providers install a line in machine.config for their
factory, e.g. firebird client and npgsql don't, so you have to manually add
that factory definition to your config file but that's about it.
* Adaptive Server Anywhere: "iAnywhere.Data.SQLAnywhere"
* DB2: "IBM.Data.DB2"
* Firebird: "FirebirdSql.Data.FirebirdClient"
* Ingres: (don't know)
* MySQL: "MySql.Data.MySqlClient"
* Oracle: ODP.NET: "Oracle.DataAccess.Client"
* Oracle: MS Oracle: "System.Data.OracleClient"
* SQLite: (don't know)
* SQL CE: v3.0: "System.Data.SqlServerCe".
* SQL CE: v3.5: "System.Data.SqlServerCe.3.5".
* Sybase ASE: "Sybase.Data.AseClient"
FB
<configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> </DbProviderFactories> </system.data> </configuration>
Actually, it's not really that weird considering that the v3.5
assembly is not backwards compatible with v3.0's so you need both registered
(for apps using 3.0) in machine.config :). Of course overall, the design of
this sucks, but as it's CE, that's no surprise.
FB