vbrtrmn has asked for the wisdom of the Perl Monks concerning the following question:
I'm having some issues deleting from a table, the error message seems a bit ambiguous, I tried googling for it, but didn't find anything useful. Can anyone throw me a bone?
Error Message:
[Wed Jan 7 19:15:33 2004] delete.pl: DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. (SQL-07002)(DBD: st_execute/SQLExecute err=-1) at ./delete.pl line 30.
Code Snipet (line 30 is the $sth->execute):
$DSN = 'DBI:ODBC:SearchWords'; $USER= ''; $PASS= 'password'; $DBH = DBI->connect( $DSN, $USER, $PASS, { RaiseError => 1} ); my $SQL = "DELETE FROM [Production Words] WHERE areaId=ofn01506"; my $sth = $DBH->prepare($SQL); $sth->execute || die "Could not execute SQL statement ... maybe invali +d?\n$!"; $sth->finish; $DBH->disconnect();
--
paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI::ODBC Delete Error
by CountZero (Bishop) on Jan 07, 2004 at 20:44 UTC | |
by vbrtrmn (Pilgrim) on Jan 07, 2004 at 23:21 UTC | |
|
Re: DBI::ODBC Delete Error
by Sandy (Curate) on Jan 07, 2004 at 21:53 UTC | |
by vbrtrmn (Pilgrim) on Jan 07, 2004 at 23:27 UTC | |
by Sandy (Curate) on Jan 07, 2004 at 23:32 UTC |