Create EnterpriseLibrary.Data.Database object from connection stri

G

Guest

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
 
R

Rodrigo Corral [MVP]

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
 
G

Guest

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.
 

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