Posts

Showing posts with the label Connection

C# - Finding connection string - Easy way

Most of the times we used to face difficulty while creating connection strings in our C# applications and especially when you are working in data intensive apps. I used to do lots of permutations and combinations (due to drivers installed) to find out the proper connection string in my initial career. Here I would like to explain easiest way and proper manner to test the connection ahead to actual usage. For database connections in C# apps you often need to supply an ADO Connection String. Here is a tip how to generate such string very easily. (Windows only) Go to your desktop  Right click and choose NEW/Microsoft Data Link - if you don't have this option on your menu, just choose NEW/Text Document  If you have make a new text file - change the file extension from .txt to .udl  Double click on the new file - you will see now the Microsoft Connection wizard (Data Link Properties)  Choose your database driver and connection properties  Test the connec...