Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

Connection String and application settings (Windows Forms)?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thorsten Dittmar - 08 Sep 2007 13:03 GMT
Hi,

I don't get it. I'm using a typed dataset with table adapters and all
that stuff. I have the database server running locally on my development
system.

Now: when creating a tableadapter I'm asked for the connection and the
connection string is automatically stored in the settings. So far so good.

However, my typed dataset is declared within a dll that implements other
business logic as well. When I look into app.config in VS2005, I can see
there's a connection string added properly. However, I don't see the
connection string in any (this is: the exe.config) config file

Question is: I don't want to redeploy the application whenever I need to
change the connection string, so where is the config file I can use to
change the connection string before starting the application???

If there is no way to do so: how can I NOT store the connection string
in the settings but provide it at runtime without losing all the comfort
while creating the application?

Thanks
Thorsten
Rak - 09 Sep 2007 00:04 GMT
If i understand your problem correctly, you have your typed dataset in a
seperate dll. You just need to add the same connection string config file
entry in the app.config of the exe which uses the dll. or web.config if it is
a web application

HTH,
Rakesh

> Hi,
>
[quoted text clipped - 20 lines]
> Thanks
> Thorsten
Thorsten Dittmar - 09 Sep 2007 15:42 GMT
Hi,

thanks! That works like expected! It should, however, be noted that I
need to copy the full connection string name from the DLL's app.config
file to the application's app.config file, as the package name doesn't
match when I use the settings editor on my application's configuration.

Thorsten

Rak schrieb:
> If i understand your problem correctly, you have your typed dataset in a
> seperate dll. You just need to add the same connection string config file
[quoted text clipped - 28 lines]
>> Thanks
>> Thorsten

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.