net class library of utilities - problem with properties.settings.default

stephenwilde
stephenwilde used Ask the Experts™
on
Hi

Trying to create  a generic utilites class for my windows projects

The code references the following amongst other default strings ;

sqlConnection1.ConnectionString = Properties.Settings.Default.SQLconnection.ToString();

problem is in class library no such properties exists - so it will not compile as they do not exisit in current context

any help please

Rgds
stephen

Rgds
stephen
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
It might be better to provide the connection string to the library from the application that consumes it.

This provides the extra benefit of being able to store the connection string in another location or switch connections string during runtime, if an application was ever needing to do this. Libraries short provide as much flexibility as possible, helping to ensure reuse in the future (if this is your intention)

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial