Click here to Skip to main content
15,888,270 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All

How to make connection with Database Without Adding Config File to LIbrary Project

Regards
Suresh
Posted

1 solution

Well you can hard code the connection string, not recommended.
You could ask for the connection details when your app starts.
If your project is a DLL you could pass it in from the calling app.

The real question for me is why don't you want it in the config file?
If it is because it is plain text then encrypt the connection string then decrypt it when you use it and only allow it to be changed from within your app.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900