JimmyC57 has asked for the wisdom of the Perl Monks concerning the following question:

ok folks,

I have search and tried solutions for 2k and nt but still can't get dbd::odbc installed on an xp machine.

Installed activeperl 5.10.0. build 1002

Installed DBI 1.602

Then i read that DBD::ODBC came with activeperl 5 so i went into ppm, looked at all packages.. found dbd::odbc, right clicked and said install. it seemed to install but now i can't find it anymore on ethier the all packages or the installed packages.

when i try and run my perl script i get the following error:

install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: C: /Perl/site/lib C:/Perl/lib .) at (eval 5) line 3. Perhaps the DBD::ODBC perl module hasn't been fully installed, or perhaps the capitalisation of 'ODBC' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.

*****************************************

Applicable code:

****************************************

<code>

#!/usr/bin/perl

use DBI;
use File::Copy;

# Assign Path and File Names

$outfilepath= '"S:\Reports\"';
$outfile= "RepInv.pdf";
$DBappfilepath = '"C:\\Program Files\\Microsoft Office\\Office12\\msaccess.exe"' ;
$DBfilepath = '"D:\\Data\\Databases\\Weekly.accdb"';
$Macro = "\/X InvRptMacro";
$ExecuteString = "$DBappfilepath $DBfilepath $Macro";

# Establish Date Prefix for Output Filename

$day = (localtime) 3;
$day = substr ("0$day",length ("0$day")-2,2);
$month = (localtime) 4 + 1;
$month = substr ("0$month",length ("0$month")-2,2);
$year = (localtime) 5 + 1900;
$filename = "$year$month$day";

#open connection to Access database

$dbh = DBI->connect('dbi:ODBC:Mapics - MM CAD');

********************************************************
<code\>

Please let me know if you need anything else from me to help!

thanks

jim

Replies are listed 'Best First'.
Re: ODBC on XP Installation Error
by lamp (Chaplain) on Sep 30, 2008 at 15:36 UTC
Re: ODBC on XP Installation Error
by procura (Beadle) on Sep 30, 2008 at 15:13 UTC
      Some of those references are out of date. I closed the rt you refer to when we got it working and only reopened it yesterday when the following topic turned up on perlmonks Strawberry CPAN.pm wrongly overrides INC in Makefile.PL. Anyway, he is using ActiveState perl and not Strawberry perl and the rt is specific to Strawberry perl.
Re: ODBC on XP Installation Error
by dHarry (Abbot) on Sep 30, 2008 at 15:21 UTC

    it seemed to install but now i can't find it anymore

    I suggest you check it (CTRL-F). For me it can be found at C:\Perl\lib or C:\Perl\site\lib.

    Also you can un-install it using the ppm tool from ActiveState and install it again.

Re: ODBC on XP Installation Error
by JimmyC57 (Novice) on Oct 01, 2008 at 19:27 UTC

    ok

    I downloaded DBD-ODBC-1.17, unpacked it and ran Makefile.pl.

    i received this error:

    Useless use of private variable in void context at makefile.pl line 595.
    You are using a Perl configured with threading enabled.
    Please read the warnings in DBI about this.
    You should also be aware that on non-Windows platforms ODBC drivers come in two forms, thread-safe and non-thread-safe drivers and you may need to make sure you are using the right one.
    Press return to continue...

    I'm sorry to be so needy... but i have no idea what that means!

    suggestions please??? besides get a new job!