When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
Published: Tuesday, July 04, 2000

Creating Connection Strings in Windows 2000, Part 2

By Björn Nilsson

  • Read Part 1

  • In Part 1 we looked at the first three steps to creating a connection string in Windows 2000. In this part we'll look at the remaining three.

    - continued -

    4.) In this example I want to make a DSN-less connection to an Access-DB. I do this by clicking the "Provider" tab and choose a Jet-type connection. (If you want to make a DSN-less connection to SQL-server or Oracle, click that one instead.)

    5.) Now click the "Next >> " button and you can type in or browse for the Access database that you want to connect to. Add or change the login part to whatever suits your needs. Testing the connection at this stage is recommended. :-) If the test connection succeeds, which it should unless you use ridiculously long and difficult to type usernames and passwords like I've done in this example, click OK.

    6.) All rignt, you're almost there. Now drag the icon of the UDL file from your (File)Explorer window onto a Notepad window and there you will see something like this:
    Click to view a larger image

    Now it's just a matter of cutting and pasting the line into your connection parts of your ASP pages.

    If you long for the Windows NT way of creating connection strings in Windows 2000, simply follow the tip provided by alert 4Guys reader Dennis Mulder:

    On Windows 2000 you certainly don't have the option to select new Microsoft Data link, we used to on Windows NT 4.0. However, you can add this option! In the following directory (on win2k) is a .reg file that just adds this option for you: C:\Program Files\Common Files\System\Ole DB\newudl.reg
    [Download these Registry File Enhancements (for Windows 2000)]

    Happy Programming!

  • Björn Nilsson

  • ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article