Have you ever wanted a quick way to get the connection string for your database? I use this all the time whenever I am doing web development or Access programming and need to get any connection string in a jiffy.
1) Create a new text document on your desktop and just call it "
2) Rename the document and change the extension to "
3) It will ask you if you are sure you want to change the extension, just click "
4) Double click on the newly renamed file and it will open up a window for "
Data Link Properties
" and in here you can easily enter all the information needed to access your database.
5) Click the "
" tab on the upper left and select from the list of providers what kind of database you want to connect to.
NOTE: If the type of database you want to connect to is not listed then the computer you are on does not have the driver for that database installed. This is also a great troubleshooting step that you can detect early if you can't connect using a pre-existing connection string.
6) Then click the "
" tab and enter the server name or IP address of the server it resides on. The layout of this tab varies based upon the database provider you choose but the basics are the same.
7) Enter any credentials needed to access the database and check the box for "
Allow password saving
" if you want the connection string to contain the password.
8) Click the "
" button to make sure you've entered everything correctly and if it does not come back successful then you need to recheck your entries and try again.
9) Click "
" to close the window and get back to your original file. Right click and select "
" and change the file extension back to "
NOTE: If you selected "Save password" then you will get a prompt asking if you are sure because it will be stored as plain text, just click "Yes".
10) Open the newly renamed "
" file and voilà! Your full connection string is the last line in the file. You can simply copy/paste into any application you are working in.
it's voila actually :)
Good article, does this work with mysql too?
And yes this does work for mySQL too as long as you have the driver for it.
"Yes" vote above.
[BTW "Viola" (not voila) was a favorite expression of "Alfalfa" in the Little Rascals series. He wasn't too smart, but he sure could sing.]