Enterprise library connection string

R

Rick Mavrovik

Hi,
I need to connect to a database the connection string of which is determined
at runtime.
I am using Enterprise Library 3.0 for data access. How can I connect to a
database
at runtime, without hardcoding the connection string in the web.config.

Please help!!

Thanks.

Rick
 
J

Jesse Houwing

Hello Rick,
Hi,
I need to connect to a database the connection string of which is
determined
at runtime.
I am using Enterprise Library 3.0 for data access. How can I connect
to a
database
at runtime, without hardcoding the connection string in the
web.config.
Please help!!

You need to instantiate the Database class manually, not through the factory.

The classes OracleDatabase and SqlDatabase each have a constructor which
will accept a complete connectionstring.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top