SQL statement problems (Full Version)

All Forums >> [Web Development] >> ASP, PHP, and Database



Message


friedsock -> SQL statement problems (10/10/2009 8:31:35)

I am getting this error message from a cgi script:
Execution problem: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. (SQL-07002)

I am really confused by this. I have double-checked the sql statement but I keep returning 0 parameters. Here is the code( I am using perl dbi):
my $DSN = 'driver=Microsoft Access Driver (*.mdb);dbq=d:\domains\pet-tortoise.co.uk\wwwroot\testingdatabase.mdb';
my $dbh = DBI->connect("dbi:ODBC:$DSN", '','')
or die "$DBI::errstr\n";
my $sql = <<"ENDOFSQL";
INSERT INTO Table2 (Firstname,Surname) VALUES ($FORM{firstname},$FORM{surname})
ENDOFSQL
$dbh->do($sql)
or die "Execution problem: $DBI::errstr";


thanks.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125