B
Bolin
I have a problem accessing a MSAccess database via OLE. The following
code:
############################
use WIN32::OLE;
use Win32::OLE::Const;
my $DBfile = "c:\\data.mdb";
my $Conn = Win32::OLE->new("ADODB.Connection") or die "Object creation
failed: $!\n";
my $RS = Win32::OLE->new("ADODB.Recordset") or die "Object creation
failed: $!\n";
my $DSN = "PROVIDER=MSDASQL;DRIVER={Microsoft Access
Driver(*.mdb)};DBQ=$DBfile;UID=;PWD=;";
$Conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$DBfile") or
die "$!\n";
############################
dies at the last line with a "No such file or directory", although the
file is there -- I really don't know what is going on. Did somebody
run into the same error? I am using perl v5.8.0 build 806 provided by
ActiveState on Windows 2000.
Thanks for your help,
G.
code:
############################
use WIN32::OLE;
use Win32::OLE::Const;
my $DBfile = "c:\\data.mdb";
my $Conn = Win32::OLE->new("ADODB.Connection") or die "Object creation
failed: $!\n";
my $RS = Win32::OLE->new("ADODB.Recordset") or die "Object creation
failed: $!\n";
my $DSN = "PROVIDER=MSDASQL;DRIVER={Microsoft Access
Driver(*.mdb)};DBQ=$DBfile;UID=;PWD=;";
$Conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$DBfile") or
die "$!\n";
############################
dies at the last line with a "No such file or directory", although the
file is there -- I really don't know what is going on. Did somebody
run into the same error? I am using perl v5.8.0 build 806 provided by
ActiveState on Windows 2000.
Thanks for your help,
G.