Codeine .Net RSS 2.0
# Thursday, 28 June 2007

I decided to repost one of my original blog posts on how to easily build and test your connection strings that was quite popular and somehow lost during the transition to the new site.  This method is fairly simple and I use it all the time when I need to build or test out a new connection string.  The first thing you need to do is create a new empty file and call it Test.udl.  Normally I use Notepad to do this, but you can use anything you want.

Once you have done this your file will display the computer icon associated with .udl files and if you double click on the file it will open up the Data Link Properties window.

Data Link Properties Window

Next, you need to fill out your connection information including provider, server, database, and login information.  In order to properly get your connection string you will need to check the allow saving password box.  At this point you can click the test connection button to verify that the connection is successful.  If it is not, you can continue to make adjustments to the Data Link Properties window until it is.

Finally, click OK to save the file, and open up the .udl file using Notepad.  If you did check the allow saving password box you will be cautioned about the security risk of saving the password.  Once you’ve opened the file you will see something similar to the follow:

 

[oledb]

; Everything after this line is an OLE DB initstring

Provider=SQLOLEDB.1;Password=yourpassword;Persist Security Info=True;User ID=sa;Initial Catalog=TimeTracker;Data Source=WDMPDC01

You have now created your connection string and can copy and paste this into your application.  This is also an excellent way of testing connectivity issues from individual computers.

 

 

Did you find this posting helpful?  Please let me know by posting a comment.

Thursday, 28 June 2007 05:00:00 (Central Daylight Time, UTC-05:00)  #    Comments [0] - Trackback - Save to del.icio.us - Digg This! - Follow me on Twitter
Original Posts

Navigation
Archive
<2007 June>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2024
David A. Osborn
Sign In
Statistics
Total Posts: 70
This Year: 0
This Month: 0
This Week: 0
Comments: 33
Themes
Pick a theme:
All Content © 2024, David A. Osborn
DasBlog theme 'Business' created by Christoph De Baene (delarou)