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