Can't speak for Paradox (and somebody on the list will give you better
advice shortly, I'm sure) but for Access and other ODBC DBs I've used:
use DBI;
my $user = '';
my $password = '';
my $connect = 'dbi::ODBC::DBNAME'; #insert your Database Name in there
my $dbh = DBI->connect($connect, $user, $password, {RaiseError => 1,
PrintError => 1, AutoCommit => 1});
my $sql = 'SELECT ID FROM STRAINS';
my $sth = $dbh->prepare($sql);
while (my @row = $sql->fetchrow_array()) {
print join("/t", @row), "\n";
}
In other words, once you have your connect string working, just go for the
DBI documentation. Also, make sure your ODBC data source is set up as a
SYSTEM DSN. It won't work otherwise -- I'm not entirely sure why, but
there were posts on this group explaining that.
Hope it helps,
Paul
On Tue, 26 Nov 2002, Brian Spindler wrote:
> Hi guys/gals,
> I need a tutorial or something on how to access Paradox
> databases with Perl, DBI and ODBC (I have the ODBC connection setup and it
> works). The files I have are .db files, and I guess I need to know, can I
> just run ANSI SQL statements against it? Is there special quirks with
> Paradox? Stuff like that. Can someone please point me in the right
> direction?
>
> Thank you in advance!
>
> ------------------------
> Brian Spindler
> Assistant I.T. Manager
> RAB Electric Mfg. Co.
> 888-RAB-1000 x 84
> 888-RAB-1232 fax
> [EMAIL PROTECTED]
>
> print scalar reverse join "", sort "tona",
> "reh","lre","ts","\nr","uj","ekca","p ","h ";
>
>