Database
  Home arrow Database arrow Page 2 - On Wiring Up an ADO Data Control
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE

On Wiring Up an ADO Data Control
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2006-10-18

    Table of Contents:
  • On Wiring Up an ADO Data Control
  • Preparatory Steps
  • Creating a New ODBC DSN
  • Testing the ODBC Data Source Name Option

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    On Wiring Up an ADO Data Control - Preparatory Steps
    (Page 2 of 4 )

    Creating a DataLink file

    Create an empty text document and rename it AccLink.udl (you may use any other name but keep the .udl extension). The operating system may warn you that the file may be unusable if renamed. Ignore this warning.

    Double click this file on the desktop where it was created. It opens the Data Link Properties window with the default tab Connection exposed as shown in the next picture. The three items that need information are clearly marked. When this window is open the default provider is the Microsoft OLEDB Provider for ODBC drivers.

    Since we are creating a connection to a Jet data source we need to choose the proper Provider. Click on the Provider tab. This shows all the installed drivers on the machine.

    Click on the Microsoft Jet 4.0 OLE DB Provider and click on the button which will open the window shown in the next picture. You may note that the Connection tab items are different from the default, since the connection depends on the Provider. You may use the ellipsis button (...) to browse to the location of the MDB file, in this case Northwind.mdb. You may also test the connection by hitting the Test Connection button.

    Click on the OK button for the Microsoft Data Link window, and the DataLink Properties window. This completes your task of creating a DataLink File. Since AccLink.udl is a text file, it may be opened with a text editor and this is what the file contains:

    [oledb]
    ; Everything after this line is an OLE DB initstring
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Documents and Settingscomputer userMy DocumentsNorthwind.mdb;Persist Security Info=False

    Creating an ODBC Data Source Name

    An ODBC Data source is easily created on Windows OS machines using the utility that comes with the operating system, with all the drivers installed on the machine. On a Windows XP machine this utility may be accessed by following the path Start--> All Programs-->Control Panel which opens the control panel. Once in the control panel, click on the Administrative Tools icon and from the window that pops up click on the Data Sources (ODBC) icon. This will bring up the ODBC Data Source Administrator window that manages and configures open database connectivity with data sources. Using this window one can create File, System and Machine Data Source Names (DSN), the name that can be used as a reference point for the data sources. If the file already exists it can be used as is, or it can be modified using the Configure... button which will open up windows where it can be modified.

    More Database Articles
    More By Jayaram Krishnaswamy


       · This tutorial discusses all the three options in wiring up the ADO data Control to...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway