perl is wrote:
>
> Can you provide me a little more detail about how to
> setup MS Access DB Data source (I never setup this
> before)?
>
Setup the DSN using the ODBC adminstrator in the control panel. Make
sure it is a system DSN if you want the script to be usable by other
account (like the web).
Assuming you have setup a DSN with the name 'testdsn' pointing to an
Access file at say:
C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb
my $dsn = 'testdsn';
my $uid = ''; my $pwd = '';
my $attr = {};
my $dbh = DBI->connect("dbi:ODBC:$dsn", $uid, $pwd, $attr) or
die "Error: Connecting to '$dsn'";
If you don't want the hassle of setting up a DSN then use a DSNless
connection:
my $driver = 'Microsoft Access Driver (*.mdb)';
my $db = 'C:\Program Files\Microsoft
Office\Office\Samples\Northwind.mdb';
my $dsn = "driver=$driver;dbq=$db";
HIH
--
Simon Oliver