Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Help connecting to an Access Database

Expand Messages
  • Don Smith
    Denny, I believe you have to register the database in the ODBC Administrator. Open Control Panel Open ODBC Datasources Click Add on the User DSN Tab
    Message 1 of 2 , Jul 2, 2002
    • 0 Attachment
      Denny,

      I believe you have to register the database in the ODBC Administrator.

      Open 'Control Panel'
      Open 'ODBC Datasources'
      Click 'Add' on the User DSN Tab
      Select 'Microsoft Access Driver
      Click 'Finish'
      Enter a Name in the 'Data Source Name' field that pops up (eg. Database693 -
      This is the name you'll use in your script).
      Click 'Select' and browse to find your database and click 'OK'
      Click 'OK' on the ODBC Microsoft Access Setup page
      Click OK on the Data Source Administrator page

      That should do it.

      Cheers,

      Don

      ----- Original Message -----
      From: "Denny Malloy" <denny.malloy@...>
      To: "Perl (E-mail)" <perl-beginner@yahoogroups.com>
      Sent: Tuesday, July 02, 2002 6:16 PM
      Subject: [PBML] Help connecting to an Access Database


      I am trying to connect to an Access data base using Win32::ODBC.

      I have read the documentation a few times and I am confused by what they
      mean by DSN.
      Follows is what the Doc says:

      $Data = new Win32::ODBC("MyDSN");

      Note: MyDSN should be either the DSN as defined in the ODBC Administrator
      -OR-
      It can be an honest-to-God DSN Connection string.

      I have tried putting the path of my Database in but this does not seem to
      work.
      $DSN="E:/xfer/693mrdf.mdb";
      $database_handler = new Win32::ODBC($DSN);

      Do I have to define something in the ODBC Administrator and if so how?

      Thanks for any help.

      Dennis Malloy
      Systems Programmer
      NPC, Inc.
      Old Route 220
      P.O. Box 373
      Claysburg, PA 16625
      www.npcweb.com
      814 239.8787
      Fax: 814 239.0105
      denny.malloy@...

      Unsubscribing info is here:
      http://help.yahoo.com/help/us/groups/groups-32.html

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




      ---
      Outgoing mail is certified Virus Free.
      Checked by AVG anti-virus system (http://www.grisoft.com).
      Version: 6.0.373 / Virus Database: 208 - Release Date: 7/1/02
    • Denny Malloy
      Thanks Don! It works. Your instructions where great! Denny Denny, I believe you have to register the database in the ODBC Administrator. Open Control Panel
      Message 2 of 2 , Jul 3, 2002
      • 0 Attachment
        Thanks Don!
        It works. Your instructions where great!

        Denny

        Denny,

        I believe you have to register the database in the ODBC Administrator.

        Open 'Control Panel'
        Open 'ODBC Datasources'
        Click 'Add' on the User DSN Tab
        Select 'Microsoft Access Driver
        Click 'Finish'
        Enter a Name in the 'Data Source Name' field that pops up (eg. Database693 -
        This is the name you'll use in your script).
        Click 'Select' and browse to find your database and click 'OK'
        Click 'OK' on the ODBC Microsoft Access Setup page
        Click OK on the Data Source Administrator page

        That should do it.

        Cheers,

        Don
      Your message has been successfully submitted and would be delivered to recipients shortly.