PC Review


Reply
Thread Tools Rate Thread

Create EnterpriseLibrary.Data.Database object from connection stri

 
 
=?Utf-8?B?SmFrZV9hZGw=?=
Guest
Posts: n/a
 
      28th Oct 2005
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
 
Reply With Quote
 
 
 
 
Rodrigo Corral [MVP]
Guest
Posts: n/a
 
      28th Oct 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


 
Reply With Quote
 
=?Utf-8?B?SmFrZV9hZGw=?=
Guest
Posts: n/a
 
      28th Oct 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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a connection object (sql/oledb/odbc) based on connection method/string. Hetal Microsoft VB .NET 2 30th Apr 2007 05:55 PM
Create Connection Using Enterpriselibrary Karthik Microsoft VB .NET 0 21st Nov 2006 11:55 AM
deriving enterpriselibrary.data.database =?Utf-8?B?Uk1C?= Microsoft ADO .NET 0 20th Apr 2006 08:17 PM
Exception message using EnterpriseLibrary.Data wapsiii Microsoft ADO .NET 1 29th Mar 2006 01:01 PM
Create EnterpriseLibrary.Data.Database object from connection stri =?Utf-8?B?SmFrZV9hZGw=?= Microsoft VC .NET 2 28th Oct 2005 01:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 PM.