Thanks for the response Eddie. However, that's not my issue. During my installation process, I need to change the connection string to point to the newly installed database. Then, I need to to execute some business classes that use the application blocks for data access. It seems that even though I can change the config file and I haven't yet written any code to use the DatabaseFactory.CreateDatabase(...) method, it still uses the old connection string instead of the new one that I just wrote out.
I'm really not sure what to do now. Thanks, Mike On Dec 3, 2007 9:41 AM, Eddie Lascu <[EMAIL PROTECTED]> wrote: > Before you go ahead and reveal your code, here is how I am doing it. I > have > an application and an app.config file. Inside the <configuration> section > I > have a section for the connection string: > > <connectionStrings> > <add name="My Database Connection String" > > connectionString="Database=MyDatabaseInstance;Server=MyDatabaseServer; > Integrated Security=Yes;" > providerName="System.Data.SqlClient" /> > </connectionStrings> > > Inside my application I execute this: > > SqlDatabase objDatabase_ = DatabaseFactory.CreateDatabase("My Database > Connection String") as SqlDatabase; > > Now, when I deploy my application, I only change the name of the database > instance and server and everything works just fine. > > HTH, > Eddie > > > > > -----Original Message----- > From: Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] Behalf Of Eddie Lascu > Sent: Saturday, December 01, 2007 5:11 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Connection strings and the MS Enterprise > Library Block > > > Can you post some code? I have been doing the exact same thing w/o any > issues for the last couple of years. You must have gotten it wrong. > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com