MySQL
  Home arrow MySQL arrow Page 3 - Using MyODBC to Connect to a Remote Databa...
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  
Mobile Linux 
App Generation ROI 
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? 
MYSQL

Using MyODBC to Connect to a Remote Database
By: Steve Knoblock
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 27
    2003-01-02

    Table of Contents:
  • Using MyODBC to Connect to a Remote Database
  • Why Connect Using MyODBC?
  • Installing MyDOBC
  • MyODBC Setup
  • Exporting a Table to the Remote Database (contd.)
  • Conclusion

  • 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


    Using MyODBC to Connect to a Remote Database - Installing MyDOBC


    (Page 3 of 6 )

    Once you've download MyODBC into a convenient directory on your hard disk, you can open the archive and decompress the files inside. I suggest using WinZip or other application that makes the job of extracting files easy.

    You can start WinZip by double-clicking on the file in the Windows Explorer. I keep mine set to the classic version, which makes the Install button readily available. This is a cool feature that will automatically create a temporary directory, unzip the archive, extract the files and start installation by running setup.exe if it finds one. Here's what the screen looks like just before installation.



    Don't forget to tell WinZip that the installation is complete so it can close its window and clean up the files. When you start the installation process, the first window you see will be the Microsoft ODBC Setup dialog. Click Continue.



    At this point, the Install Drivers dialog window should appear. (If you do not reach this point in the installation, something is wrong with the way Windows is setup. Please contact Microsoft support to help resolve this issue.) Select MyODBC and click OK (or just click OK).



    If have trouble installing the driver or are merely curious, you will find version related installation options by clicking on the Advanced button. This button brings up the Advanced Installation Options dialog window.



    Further information about the driver version is available in the Versions dialog, by clicking on the Versions button in the Advanced Installation Options dialog.



    If the MyODBC driver was successfully installed, the next dialog you see will be the Data Sources dialog. This dialog is part of the Microsoft ODBC system and not a part of MyODBC. You should see the sample data source installed by MyODBC, called sample-MySQL (MySQL) in the data sources driver window. Although you could select the MySQL entry and push the Setup button to bring up the MyODBC setup panel, we will be configuring the remote connection from within MS Access. That is so we can create a data source tailored to our project.



    When you're done, you should see a message telling you that the new ODBC driver has been successfully installed. Click OK.



    Configuring and Connecting

    Connecting to An Established Remote Database
    Once you have installed the driver, we will use Access to connect to the remote database. The database must be setup for remote access. At many hosting providers, this is done only by request. Please ask your administrator or hosting provider support team about activating remote access to your MySQL database. Setting up a Data Source, choosing a ODBC driver and creating a Data Source Name (DSN) for Windows applications to reference your database can be a daunting task. There are many settings involved and many terms which you may be unfamiliar with. But broken down, the steps are relatively easy to follow and fall into place.

    Click File | Get External Data | Import. Click New in the Data Source window. The MyODBC driver dialog should appear.

    Creating a New Data Source
    At this point you need to create a new data source. A data source is where data comes from through a ODBC connection. The Database Source Name (DSN) is the name of the database. When you create the database source, give it any name you like.

    Using the Create a New Data Source Wizard
    The first step is to create a new Windows data source. This allows Windows applications to connect to your ODBC database. Select User Data Source. Click Next.



    The next screen presents you with a list of available ODBC drivers you can use to create a data source. (You can have as many data sources as you need, each using any ODBC driver available). Select the MySQL driver. It will be identified as to name, version and the developer, TCX. Click Next.



    A purely informational screen appears, displaying the data source type and choice of ODBC driver. As the dialog says, the next step will be to optionally configure the driver-specific settings. Click Next.

    More MySQL Articles
    More By Steve Knoblock


     

    MYSQL ARTICLES

    - MySQL and BLOBs
    - Two Lessons in ASP and MySQL
    - Lord Of The Strings Part 2
    - Lord Of The Strings Part 1
    - Importing Data into MySQL with Navicat
    - Building a Sustainable Web Site
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - PhpED 3.2 – More Features Than You Can Poke ...
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - Security and Sessions in PHP
    - Setup Your Personal Reminder System Using PHP
    - Create a IP-Country Database Using PERL and ...
    - Developing a Dynamic Document Search in PHP ...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek