Database
  Home arrow Database arrow Page 4 - 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

    Free Web 2.0 Code Generator! Generate data entry 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 - Testing the ODBC Data Source Name Option
    (Page 4 of 4 )

    Similar to the DataLink option test, a form and a textbox will be used. The ADODC control settings are as shown. The DSN name created earlier will be browsed to choose it from the list of DSNs available. The authentication in this case will be the appropriate one for the Oracle Server.

    For the record source, a table from the Oracle 10G XE database is chosen as shown.

    When this form is run you will see the first name of the Employee as shown since the textbox was configured so that the DataField was set to look at First_Name.

    Using and Testing the Connection String Option

    Again place the ADODC control on the form and choose the option to use the Connection string as shown. Click on the browse button which opens up the datalink window as shown. This is the same as the first option, but the string is created inside the program. Since we will be connecting to a SQL 2005 Server we will use the SQL Native Client driver as shown.

    In the Connection tab the other related information is entered as shown. The SQL 2005 server MYSORIAN is on a networked machine named HODENTEK. Appropriate login information must be added, which allows you to choose the database. When you click on the OK button in the window above, the connection string information will be added as shown. In the connection string, the password has been doctored to mask the clear text for this picture.

    After entering the authentication information, the Suppliers table was chosen as the RecordSource. For the textbox, the CompanyName was used as the chosen DataField to be displayed.

    When this form was run the following information was displayed.

    Summary

    Connecting the ADODC control to the data source is greatly facilitated by the support provided by this control. The connection can be to any type of database for which appropriate drivers are available. However while using a DataLink file created outside the Visual Basic program, the Microsoft Data Link file may present some problems. This is especially true for the Windows XP operating system. While the Data Link file shows a successful connection when it is tested by itself, it may produce a design time error in the VB program. This is probably because the connection string constructed from the utility may not be format-compatible (Unicode vs. text) to what the VB program is expecting.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · 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 5 hosted by Hostway