OLEDB: Create connection string

A little trick to create a OLEDB connection string:

  • On a Windows desktop (or any other folder) create a new text file.
  • Rename the file to MyNewConnection.udl
  • Double click the file which will open the guide Data Link Properties.
  • Insert your connection data, test the connection and close the guide by pressing OK
  • Open the file in your favorite text editor and view the connectionstring

Examples of generated connection strings:

  •  Provider=SQLOLEDB.1;Password=MyPsw;Persist Security Info=True;User ID=MyUser;Initial Catalog=MyDb;Data Source=mydbserver\mydbinstance
  • Provider=MSDASQL.1;Persist Security Info=False;MyUser ID=user1;Data Source=MyOdbcDsn;Initial Catalog=MyDB

Thanx to Rakesh Moturi

The End


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: