At 10:30 AM 06/18/2001 -0500, Kris Cook wrote:
>I'm curious.  Why, when the ODBC functionality is distributed with
>ActiveState's Perl, do all examples I see in this group use DBI?  The
>application I'm working on uses an Access database, and I can't find Access
>drivers for DBD, so DBI is useless to me, along with every example using it.

DBI is only the database /abstraction/ module. DBI doesn't really do
anything by itself without using a DBD (database driver) in association
with it. This seperates the database query logic from the nitty gritty,
under-the-hood mechanics of the database driver itself. This makes porting
your scripts to other database systems as easy as changing the DBD driver
in the DBI->connect string (in theory at least). In your case, you want to
call the DBD::ODBC driver to connect to your MS-Access DSN.

I regularly switch between a MySQL database and a MS-Access97 database
using this method all the time. Of course each database system has its own
ideas of what valid SQL is, so it's not always seamless, but as long as you
understand these differences (which you'd have to understand regardless of
DBI), you should have no problems whatsoever tailoring any DBI example to
your specific database engine.

>I'd LOVE to use DBI - placeholders in SQL alone are enough reason to switch
>- but it doesn't appear to be an option.  It's very frustrating.

Placeholders work fine with the DBD::ODBC driver. 

Spend some time reading through the official DBI pages at
http://dbi.perl.org/ . All the specifics you need to know are there.

HTH...Aloha!








__________________________________________________________
mel matsuoka                    Hawaiian Image Productions
Chief Executive Alphageek              (vox)1.808.531.5474
[EMAIL PROTECTED]                  (fax)1.808.526.4040

Reply via email to