After long fighting with configuring OpenLink on Windows -95 and Solaris, 
installing DBI, DBD::ODBC, etc. I eventually was able to get positive
results for the OpenLink and 'make test'. It looked like a bridge between
Solaris based Apache and Perl and Windows based Access db was built. But
when I tried to run cgi scripts they failed. Then I tried very simple
script:
----------------------------
#!/bin/perl -w

use DBI;

### Set the tracing level
unlink 'dbitrace.log' if -e 'dbitrace.log';
DBI->trace( 2, 'dbitrace.log' );


### Perform connection using ODBC driver
my @dbh = DBI->connect( "DBI:ODBC:MainPET","ecat7","ecat71")
 or die "Can't connect to ODBC:MainPET: $DBI::errstr\n";

$diagnosis= "Breast";

 #prepare and execute SQL statement
 $sqlstatement="SELECT Visits.PName, Visits.BrID, Visits.Diagnosis
  FROM Visits WHERE Visits.Diagnosis=$diagnosis";

 $sth = $dbh->prepare($sqlstatement);
 $sth->execute ||
       die "Could not execute SQL statement ... maybe invalid?";

#output database results
 while (@row=$sth->fetchrow_array)
  { print "@row\n" }

exit;
---------------------------------------------
It stops with the message:
Can't call method "prepare" on an undefined value at test_connect_db.pl

dbitrace.log:

DBI 1.20-nothread dispatch trace level set to 2
    -> DBI->connect(DBI:ODBC:MainPET, ecat7, ****)
    -> DBI->install_driver(ODBC) for solaris perl=5.00503 pid=16589 ruid=111
euid=111
       install_driver: DBD::ODBC version 0.28 loaded from
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ODBC.pm
    <- install_driver= DBI::dr=HASH(0x145178)
    -> connect for DBD::ODBC::dr (DBI::dr=HASH(0x145178)~0x17bbb8 'MainPET'
'ecat7' **** HASH(0xc2864))
Driver connect 'MainPET', 'ecat7', 'ecat71'
    <- connect= DBI::db=HASH(0x17bb28) at DBI.pm line 426
    -> STORE for DBD::ODBC::db (DBI::db=HASH(0x17ba8c)~INNER 'PrintError' 1)
    <- STORE= 1 at DBI.pm line 451
    -> STORE for DBD::ODBC::db (DBI::db=HASH(0x17ba8c)~INNER 'AutoCommit' 1)
    <- STORE= 1 at DBI.pm line 451
    <- connect= DBI::db=HASH(0x17bb28)
    -> DESTROY for DBD::ODBC::db (DBI::db=HASH(0x17ba8c)~INNER)
    <- DESTROY= undef
    -- DBI::END
    -> disconnect_all for DBD::ODBC::dr (DBI::dr=HASH(0x145178)~0x17bbb8)
    <- disconnect_all= '' at DBI.pm line 468
    -> DESTROY in DBD::_::common for DBD::ODBC::dr
(DBI::dr=HASH(0x17bbb8)~INNER)
    <- DESTROY= undef during global destruction


I played with different SQL statements but none worked. Obviously something
wrong  with the ODBC driver.

Will appreciate any help,

Leonid.



----------
>From: "Sterin, Ilya" <[EMAIL PROTECTED]>
>To: SYRKIN <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: Access-97 DB on shared UNIX partition
>Date: Tue, 30 Oct 2001 00:56:38 -0500
>

> Access-97 DB on shared UNIX partition

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to