Create a database instance using MS Enterprise Library

Topics: Data Access Application Block
Apr 18, 2008 at 5:43 PM
How to create a database instance using the connection string "Server="xx";DataBase="dsdf".." in MS Enterprise Library 2006.



Database db = DatabaseFactory.CreateDatabase(connectionstring);



We can create by giving the configuration connection string name.



Thanks in advance
Apr 18, 2008 at 7:21 PM
You would do

Database db = new SqlDatabase(connectionString);

Assuming you want to access a SQL Server.

Fernando