• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

class library - connection string with typed datasets

I have a class library project and I've added a typed dataset to the project.  After compiling, everything ran fine in my development environment, but when I moved the assembly to my test server, which is using a different sql server, the connection didn't work.

I discovered that the connection string is hard-coded into the settings file in the class library project.  Thereby, I had to modify the connection string, recompile, deploy.  Then back in my development environment, I  had to reset the connection string for my development sql server, recompile and add the reference to my development  project again.

Please tell me there is an easier way to handle this?  If I have to make changes or add new typed datasets, I'd have to do the same over again.

Is there a way to overcome this?

Thanks for any help.
0
-Dman100-
Asked:
-Dman100-
  • 2
1 Solution
 
DhaestCommented:
Is your connectionstring stored into the code or is it stored in a settings.settings, app.config, ... ?
0
 
DhaestCommented:
Perhaps this article can help you further
How to move a Typed Dataset to its own Project and Namespace - Part 2 - Deployment and ConnectionStrings
http://kmccaa.blogspot.com/2007/07/how-to-move-typed-dataset-to-its-own_11.html
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now