manoorani has asked for the wisdom of the Perl Monks concerning the following question:
error executing query "INSERT INTO logfile ( {Date Send}, {Certificate file} ) VALUES ('01/01/02' 'junk')" Error: -3502 1 "MicrosoftODBC Microsoft Access Driver Syntax error in IN SERT INTO statement."use strict; use Win32::ODBC; my $DSN = "DRIVER=Microsoft Access Driver (*.mdb);FIL=MSAccess;DriverI +d=25;DBQ=c:\\perlscript\\NOTICE.mdb"; my $db; my $query = "INSERT INTO logfile ({Date Send}, {Certificate file} ) VALUES ('01/01/02' 'junk')"; if (!($db = new Win32::ODBC($DSN))) { print "Error connecting to $DSN\n"; print "Error: " . Win32::ODBC::Error() . "\n"; } if ( $db->Sql($query)) { print "error executing query [ \"$query\" ]\n"; print "Error: " . Win32::ODBC::Error() . "\n"; } $db->Close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Add record in access table
by MZSanford (Curate) on Feb 08, 2002 at 16:55 UTC | |
by Anonymous Monk on Feb 08, 2002 at 17:52 UTC | |
|
Re: Add record in access table
by gellyfish (Monsignor) on Feb 08, 2002 at 16:54 UTC |