in reply to newbie wants to install DBI for ActiveState

Anonymous Monk

from the DOS command line you can either enter 'ppm' in its interactive mode by just typing 'ppm' and then do a search, like:

search DBD
then do an install:
install DBD-ODBC

Then you should have what you need. With Active State you do not need to download zip files and install them. You can use ppm to handle the process, find the latest version and then allow you to install.

jdtoronto

  • Comment on Re: newbie wants to install DBI for ActiveState

Replies are listed 'Best First'.
Re: Re: newbie wants to install DBI for ActiveState
by Anonymous Monk on Sep 16, 2003 at 20:43 UTC
    Both of your responses were correct. Thanks. Once I simply used ppm, I could install the DBD-ODBC module without incident. I can now access my database fine.

    However, when I execute the following code:

    #!/usr/bin/perl -w use DBI; my @drivers = DBI->available_drivers; die 'no drivers installed' unless @drivers; for my $driver (@drivers) { print "driver:\t$driver\n"; my @dsns = DBI->data_sources($driver); for my $dsn (@dsns) { print "dsn:\t$dsn\n"; } }

    I get the following output:

    C:\Perl\source>perl dbtest.pl driver: ExampleP dsn: dbi:ExampleP:dir=. driver: ODBC dsn: DBI:ODBC:MS Access Database dsn: DBI:ODBC:Excel Files dsn: DBI:ODBC:dBASE Files dsn: DBI:ODBC:Visual FoxPro Tables dsn: DBI:ODBC:Visual FoxPro Database dsn: DBI:ODBC:testdb driver: Proxy install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC (@I +NC contain s: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/DBD/Proxy.pm li +ne 28. BEGIN failed--compilation aborted at C:/Perl/site/lib/DBD/Proxy.pm lin +e 28. Compilation failed in require at (eval 3) line 3. Perhaps a module that DBD::Proxy requires hasn't been fully installed at dbtest.pl line 10 C:\Perl\source>

    Any ideas on what's going on with the Proxy driver? Should I be concerned about this?

      If you don't need the DBD::Proxy driver then you shouldn't be concerned, but if you do you can just use ppm to install the RPC::PlClient package as well and solve the problem.


      We're not surrounded, we're in a target-rich environment!
      You are asking DBI what drivers it knows about.   You are then asking each driver what data sources it knows about.   But to ask each driver for that information, DBI has to load the module for each driver.   At that point you discovered that DBD::Proxy had some dependencies you hadn't installed yet.   As jasonk said, this isn't really a problem unless you _really_ wanted to use the Proxy driver.

      I added a couple lines to your code to skip trying to load module DBD::Proxy and ran the loops to completion:

      print "driver:\t$driver\n"; if( $driver eq 'Proxy' ) { print " skipping polling DSN's for Proxy driver.\n"; next; }
      The output (on my system) was:
      driver: CSV
      dsn:    DBI:CSV:f_dir=test1
      driver: Chart
      driver: ExampleP
      dsn:    dbi:ExampleP:dir=.
      driver: File
      dsn:    DBI:File:f_dir=test1
      driver: ODBC
      dsn:    DBI:ODBC:dBASE Files
      dsn:    DBI:ODBC:Excel Files
      dsn:    DBI:ODBC:MS Access Database
      driver: Proxy
        skipping polling DSN's for Proxy driver.
      driver: SQLite
      driver: mysql
      dsn:    DBI:mysql:mysql
      dsn:    DBI:mysql:mytest
      dsn:    DBI:mysql:test