I think you have to check for errors, they won't exactly jump out at you so
like:

use Win32::ODBC;
my $db = new Win32::ODBC("myDatabase");
if (!defined ($db) )
{
  ErrorMsg("Failed to connect to database. Error: " . Win32::ODBC::Error());
}
etc....

Where "ErrorMsg" is some method that communicates the error to the use (a
print or carp or whatever you wanna use).

If you get error 911 can't access DB lemme know I know how to fix that too.
:)  (btw IMHO use some other db then Pervasive if AT ALL possible).

HTH
-Wayne

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 2:29 AM
> To: [EMAIL PROTECTED]
> Cc: Haugan, Egil
> Subject: Pervasive database and Perl
> 
> Does anybody have any experience with ODBC connection to Pervasive
> database?
> On my NT4 system I have defined a system DSN in the ODBC Data Source
> Administrator and try to run this code:
> 
> use Win32::ODBC;
> my $db = new Win32::ODBC("myDatabase");
> $db->Sql("SELECT * FROM myTable");
> my $row = $db->FetchRow();
> 
> I get no error messages, and no content in $row.
> 
> I run the same code on a MS Access database, and it works without
> problems.
> 
> Agot Ligaarden
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to