Link to home
Start Free TrialLog in
Avatar of -Dman100-
-Dman100-Flag for United States of America

asked on

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.
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Is your connectionstring stored into the code or is it stored in a settings.settings, app.config, ... ?
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial