You don't call unixODBC.  You setup a data source for unixODBC, then you reference the 
datasource as if it was a dataserver. I just went through this exercise. The odbc.ini 
and odbcinst.ini need to have the correct entries for the source of your data. The 
name that is created in brackets is the name you pass to DBI. 


Christian Stalp wrote on 9/7/2004, 10:21 AM:
> I tryed to call UnixODBC via DBI. 
> .... 
> my $data_source = "dbi:UnixODBC:refdb"; 
> 
> 
> $dbh = DBI->connect ( $data_source, $user, $password ) 
>                      or die "unable to connect !\n"; 
> 
> ..... 
> 
> and got : 
> 
> install_driver(UnixODBC) failed: Can't locate DBD/UnixODBC.pm in @INC (@INC 
> contains: /usr/local/lib/perl5/5.8.3/PA-RISC2.0 /usr/local/lib/perl5/5.8.3 
> /usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0 
> /usr/local/lib/perl5/site_perl/5.8.3 /usr/local/lib/perl5/site_perl .) at 
> (eval 1) line 3. 
> Perhaps the DBD::UnixODBC perl module hasn't been fully installed, 
> or perhaps the capitalisation of 'UnixODBC' isn't right. 
> Available drivers: Adabas, DBM, ExampleP, File, Proxy, Sponge. 
> at ./dbi-test1.pl line 15 
> 
> But there is a UnixODBC.pm in  
> /usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0/ 
> 
> and this directory is part of @INC. you see: 
> 
> [imserv03]/home/STALP > perl -e 'printf "%d %s\n", $i++, $_ for @INC' 
> 0 /usr/local/lib/perl5/5.8.3/PA-RISC2.0 
> 1 /usr/local/lib/perl5/5.8.3 
> 2 /usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0 
> 3 /usr/local/lib/perl5/site_perl/5.8.3 
> 4 /usr/local/lib/perl5/site_perl 
> 5 . 
> 
> Why perl don't except the module? 
> 
> Gruss Christian 
> 
> 
> -- 
> Christian Stalp 
> 
> Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI) 
> Obere Zahlbacher Straße 69 
> 55131 Mainz 
> Tel.: 06131/ 17-6852 
> 
> E-Mail: [EMAIL PROTECTED] 
> Internet: www.imbei.de 

-- 
Your Friendly Neighborhood DBA,

Chuck 

Reply via email to