Enterprise library connection string

  • Thread starter Thread starter Rick Mavrovik
  • Start date Start date
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
 
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.
 
Back
Top