Connection String and application settings (Windows Forms)?

  • Thread starter Thorsten Dittmar
  • Start date
T

Thorsten Dittmar

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
 
G

Guest

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
 
T

Thorsten Dittmar

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
 

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