How to pass connection string to CreateDatabase method instead of Key

Topics: Data Access Application Block
Jun 18, 2010 at 3:14 PM
I am looking for example to pass connection string to DatabaseFactory.CreateDatabase instead of Key, i have searched all help but i couldn't find. Please help me how to solve this issue.
Jun 21, 2010 at 2:24 AM

The CreateDatabase method doesn't have an overload which allows you to pass the actual connection string.  The only way to create an instance of it passing a connection string would be to instantiate the specific database.

Database db = new SqlDatabase(connectionString);

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com