SPUG: MS Access and DBI
Brose, Eric
eric.brose at attws.com
Tue May 29 16:48:02 CDT 2001
Hello,
I've written a few small CGI apps in which i've used an MS Access dB as the
backend. Until now, I've only had to use select and insert statements and
everything's been hunky dory. Whenever I try to run a very simple UPDATE or
DELETE stmt like this
my $sqlstatement="DELETE * from Player WHERE
Player.playerName=\"Scooby\";";
print "$sqlstatement";
my $sth = $dbh->prepare($sqlstatement);
unless ($sth->execute) {
die "Could not execute SQL statement ... maybe invalid?";
}
I get an error reading:
DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver] Too
few parameters. Expected 1
. (SQL-07001)(DBD: st_execute/SQLExecute err=-1) at update.pl line 26.
I don't want to change the design of my dB to get around this, but I haven't
been able to get this to work for a few days now. Does anyone have
experience with this?
Thanks,
EB
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list