Building Connection Strings the easy way

Chris Webb recently blogged about a conversation that a group of us were having where the topic of the Timeout connection string property came up.

Chris asked how I found out about this property. The technique I used is handy for exploring all types of connection string properties, so I thought I would share it here.

  1. Create a new text document on your desktop.

  2. Rename it to test.udl (its the extension that matters, the name can be anything you like)

  3. double click on this file and it brings up a "Data Link Properties" dialog.

  4. Go to the provider tab and set the provider to "Microsoft OLEDB Provider for Analysis Services 9.0" (or choose any another provider in which you are interested.)

  5. You can then work your way through the dialog setting connection properties,

  6. Under the "All" tab you will find and entry for timeout. (along with all the other properties that the selected provider supports.)

  7. Once you have set all the properties you want, open up the .udl file using notepad you will see a connection string with all the appropriate settings.

This is a great way to generate connection strings and make sure that you have all the settings spelt right. Enjoy!

Print | posted on Sunday, November 5, 2006 9:39 PM

Comments on this post

# re: Building Connection Strings the easy way

Requesting Gravatar...
Many Thanks. Takes the head banging out of the process.
Left by Steve on Aug 17, 2009 3:42 AM

# re: Building Connection Strings the easy way

Requesting Gravatar...
Nice post,

thanks you for the step by step guide, it has been so helpful in building strings

Thanks for writing about it
Left by web development company on Oct 14, 2009 7:22 PM

# re: Building Connection Strings the easy way

Requesting Gravatar...
wow, so easy. Thanks you for making it painless
Left by ddinh on Oct 20, 2009 1:38 PM

# re: Building Connection Strings the easy way

Requesting Gravatar...
Thanks !!
Saved my time.

- Hari Gudigundla
www.gudigundla.com
Left by Hari Gudigundla on Jun 07, 2010 10:01 AM

# re: Building Connection Strings the easy way

Requesting Gravatar...
This was a diamond in the rough, been trying to connect Visual Studio 2010 to IBM DB2. What a pain.
This cut right thru it all....THANK YOU!
Left by Luke Eason on Nov 30, 2010 6:31 AM

# re: Building Connection Strings the easy way

Requesting Gravatar...
You might also want to try the SQL Connection string generator on Developer Fusion. It's only for SQL Server/Express right now but makes things nice and easy.
Left by James Crowley on Mar 11, 2011 6:17 AM

Your comment:

 (will show your gravatar)