I try to make insert/update operations into MSAccess
(maxx.dbd on my local hard drive)
with table 'table1' that hast the simpliest structure:
table1
------------
id | value
id,value -numeric
i run the following script:
use DBI;
$path_to_db="d:\\Perl\\work\\Access\\maxx.mdb";
my $DSN = "driver=Microsoft Access Driver
(*.mdb);dbq=$path_to_db";
my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') or
die "$DBI::errstr\n";
$dbh->do("insert into table2(id,value) values(6,6)")
or die "$DBI::errstr\n";
$dbh->disconnect;
But i get an error:
[Thu Jun 27 23:18:21 2002]
D:\Perl\work\Access\access.pl: DBD::ODBC::db do faile
d: [Microsoft][ODBC Microsoft Access Driver] Syntax
error in INSERT INTO stateme
nt. (SQL-37000)(DBD: st_prepare/SQLPrepare err=-1) at
D:\Perl\work\Access\access
..pl line 21.
What's up? Select operations are OK.
I am using ActivePerl with DBD::ODBC v.0.28