how to install DBD:ODBC on Windows XP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arlie
    New Member
    • Apr 2008
    • 4

    how to install DBD:ODBC on Windows XP

    I just installed ActivePerl-5.8.8.822 & downloaded DBD-ODBC. Did this on Windows XP:

    ppm install DBD-ODBC.ppd

    got this:

    ppm install failed: Can't find any package that provide DBI version 1.21 for DB-ODBC

    ~~~

    I'm a perl newbie. I'll be glad if someone could help on this. I am now trying to use Perl to migrate some data.

    Regards,

    Arlie
  • nithinpes
    Recognized Expert Contributor
    • Dec 2007
    • 410

    #2
    Originally posted by arlie
    I just installed ActivePerl-5.8.8.822 & downloaded DBD-ODBC. Did this on Windows XP:

    ppm install DBD-ODBC.ppd

    got this:

    ppm install failed: Can't find any package that provide DBI version 1.21 for DB-ODBC

    ~~~

    I'm a perl newbie. I'll be glad if someone could help on this. I am now trying to use Perl to migrate some data.

    Regards,

    Arlie
    I am not sure about exact implication of the error :( .
    The package DBD::ODBC is dependent on DBI. But once you type,
    Code:
    ppm install DBD-odbc
    all the dependencies should be automatically downloaded. May be you have DBI installed which is older than version 1.21. You may try to re-install DBI and install DBD::ODBC.
    Code:
    ppm uninstall DBI
    ppm install DBI
    ppm install DBD-odbc

    Comment

    • arlie
      New Member
      • Apr 2008
      • 4

      #3
      Originally posted by nithinpes
      I am not sure about exact implication of the error :( .
      The package DBD::ODBC is dependent on DBI. But once you type,
      Code:
      ppm install DBD-odbc
      all the dependencies should be automatically downloaded. May be you have DBI installed which is older than version 1.21. You may try to re-install DBI and install DBD::ODBC.
      Code:
      ppm uninstall DBI
      ppm install DBI
      ppm install DBD-odbc
      Thanks for your reply. I finally was able to install it. I simply tried installing all available packages and finally was able to install it using DBD-ODBC-1.11. I still need to test it though if it really works.

      I got the it from here: http://ppm4.activestat e.com/PPMPackages/zips

      Comment

      • arlie
        New Member
        • Apr 2008
        • 4

        #4
        Originally posted by nithinpes
        I am not sure about exact implication of the error :( .
        The package DBD::ODBC is dependent on DBI. But once you type,
        Code:
        ppm install DBD-odbc
        all the dependencies should be automatically downloaded. May be you have DBI installed which is older than version 1.21. You may try to re-install DBI and install DBD::ODBC.
        Code:
        ppm uninstall DBI
        ppm install DBI
        ppm install DBD-odbc
        I downloaded the ppd files from the office and install it at home. Since I don't have internet at home. I might be missing some dependcies because as much as dbd-odbc installed I still can't use it. I got this error:

        DBD::ODBC initialisation failed: Can't locate object method "driver" via package
        "DBD::ODBC" at C:/Perl/lib/DBI.pm line 782.

        Perhaps the capitalisation of DBD 'ODBC' isn't right. at odbc.test.pl line 6

        Comment

        • arlie
          New Member
          • Apr 2008
          • 4

          #5
          Originally posted by arlie
          I downloaded the ppd files from the office and install it at home. Since I don't have internet at home. I might be missing some dependcies because as much as dbd-odbc installed I still can't use it. I got this error:

          DBD::ODBC initialisation failed: Can't locate object method "driver" via package
          "DBD::ODBC" at C:/Perl/lib/DBI.pm line 782.

          Perhaps the capitalisation of DBD 'ODBC' isn't right. at odbc.test.pl line 6
          Below is my odbc test code:

          [CODE=perl]use strict;
          use DBI;

          use DBD::ODBC;
          print $DBD::ODBC::VER SION;
          my $dbh = DBI-> connect('dbi:OD BC:Luke');[/CODE]
          Last edited by eWish; Apr 4 '08, 02:59 AM. Reason: Please use code tags

          Comment

          • eWish
            Recognized Expert Contributor
            • Jul 2007
            • 973

            #6
            Try changing the last line to this. Also, check out the DBD::ODBC docs for more information.

            [CODE=perl]my $dbh = DBI->connect('dbi:O DBC:DSN', 'user', 'password');[/CODE]
            --Kevin

            Comment

            Working...