Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Creating Data Link (UDL) Files in Delphi
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
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? 
DELPHI-KYLIX

Creating Data Link (UDL) Files in Delphi
By: Danish Ahmed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-08-06

    Table of Contents:
  • Creating Data Link (UDL) Files in Delphi
  • Section 1: Adding a new ODBC Data Source
  • Section 2: Connecting with SQL Server Drivers
  • Section 3: Creating Data Link files programmatically
  • Section 4: More undocumented routines in ADODB

  • 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
     
     
    ADVERTISEMENT


    Creating Data Link (UDL) Files in Delphi - Section 1: Adding a new ODBC Data Source


    (Page 2 of 5 )


    [dsn_Screenshot1.jpg]

    Go to control panel|Administrative Tools and click on the Data Source (ODBC) icon. This should bring up a multi-tabbed dialog box. Click on the Add button and you are presented with a list of available drivers. Select the appropriate driver (which in my case is MS SQL Driver) and click Finish. Another dialog is displayed; enter the data source name and description which you will later use to connect to the data source.

    The drop-down box lists the available database servers on the network; select the appropriate server name and click Next. The next step requires you to specify how the server should authenticate the login, OS authentication or SQL Server authentication with the credentials provided by the user. If it's the latter then you need to make sure you have entered the correct username and password. Click next, and from the drop-down box select "testdb" as the default database.

    The last page contains language, encryption, regional settings and logging options which are pretty much obvious. After clicking finish you are presented with a message window listing the configuration. Click on "Test connection" to make sure that the Data Source was created successfully. If the result is affirmative you have successfully created the DSN and can now use it to connect to the database from your Delphi program.

    Now let us get back to the .udl file. Double-click on it to bring up the Data Link Property dialog box if it is not already visible. Make sure the Connection tab has focus. The ODBC DSN you created should now be available in the drop-down box (click refresh if it is not available). Select the DSN, enter the user name and password and check "allow saving password." Next select the initial catalog to use from the list available in the drop-down box. Click test connection to verify that the connection was successful.

    More Delphi-Kylix Articles
    More By Danish Ahmed


     

    DELPHI-KYLIX ARTICLES

    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...
    - Using Try and Finally to Help Prevent Memory...







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