Is there any way to create a
Microsoft.Practices.EnterpriseLibrary.Data.Database object without reading
from a configuration file?

I am writing a utility that manages databases in SQL Server. The utility
queries SQL Server for the database names. So I don't know the names of the
databases beforehand, but I will know the names and connection strings once
the server has been queried.

However, I have a class that I'd like to work with that requires a
Microsoft.Practices.EnterpriseLibrary.Data.Database object.

Is there any way to create a
Microsoft.Practices.EnterpriseLibrary.Data.Database when I already know the
connection string?

Thanks in advance

Re: Create EnterpriseLibrary.Data.Database object from connection stri by Rodrigo

Rodrigo
Fri Oct 28 06:16:38 CDT 2005

AFAIK you can not use a connection string. You must put the connection's
infomation in the data access blog configuration file.
You can use the Configuration Application Block in order to add database
configuration infomation to the data access blog configuration file.

--
Un saludo
Rodrigo Corral González [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org



Re: Create EnterpriseLibrary.Data.Database object from connection by Jakeadl

Jakeadl
Fri Oct 28 07:20:04 CDT 2005

Thank you for your quick response.

Are you able to point me to an example of how I'd do this? I haven't had any
luck in my searches.

Thanks again.

"Rodrigo Corral [MVP]" wrote:

> AFAIK you can not use a connection string. You must put the connection's
> infomation in the data access blog configuration file.
> You can use the Configuration Application Block in order to add database
> configuration infomation to the data access blog configuration file.
>
> --
> Un saludo
> Rodrigo Corral González [MVP]
>
> FAQ de microsoft.public.es.vc++
> http://rcorral.mvps.org
>
>
>