views:

239

answers:

2

Am using enterprise library data access application block... is there any performance impact of using System.Data.DbType Vs System.Data.SqlType?

And also, would like to know performance impact for the statement: DatabaseFactory.CreateDatabase("MyDB")

Vs

new SqlDatabase(myConnectionString);

Thanks.

+1  A: 

Any performance difference will be neglible (especially compared with database accesses).

Mitch Wheat
+3  A: 

The impact here is not one of performance but more explicitness versus flexibility. the DBType and DatabaseFactory methods are more flexible and allow you to flip the type of database you are using. You might see a small bit of perf in the other direction, but not enough to make your decision based on perf.

Gregory A Beamer