VB, .NET, SQL Server, MOSS
Programming for life!
Serving the web community
with my knowledge

If you want to connect to a database using ADO or ADO.Net, you need a connection strings. In case you can't remember them, or want to test them, there is a quick way to generate them.
Go to your desktop, or open Windows Explorer. Right-click, or select the File menu. Then, click New > Text document
Then, rename the file extension to UDL (Universal Data Link). For example, name the file test.udl.
Ignore the error Windows gives you, because you've changed the extension.
Now when you look on your desktop or in Windows Explorer, you'll see that the icon has changed for the file. Also, the file type has changed, as shown below.
When you double-click the file, you can change the connection properties. For instance, on the first tab, you can select a provider, like SQL Server or Oracle. On the second tab, you can change the connection properties.
The second tab also has a great button: Test connection. Whenever you want to check if your login works, simply press that button.
And now the fun part of this UDL file. When you click OK, the connection string is stored inside the file. Simply open it using Notepad to view it. Then you can copy it, and paste it into your applications.
Note that for the SqlProvider for ADO.Net, you'll have to remove the part Provider=SQLOLEDB.1;
Last modified on: 2005-12-09