That error is usually caused when you call execute with more params than you
have place holders (ie. question marks usually) in your SQL.

Something like this would cause the error:

# no question marks, but I call exec with 1 param
$dbh->prepare("Select * from foo");
$dbh->execute("foobar");

Or this...

# one ? but two params
$dbh->prepare("Select * from foo Where x = ?");
$dbh->execute("foobar", 98798);

These are ok though...

$dbh->prepare("Select * from foo");
$dbh->execute();

Or this...

$dbh->prepare("Select * from foo Where x = ?");
$dbh->execute(98798);

So check your execute, it sounds like you are passing a param when you
shouldn't be.

Rob

-----Original Message-----
From: Chris and Madonna Stalnaker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 2:33 PM
To: perl-web
Subject: newbie: still a problem


thanks for the replies,

this is my new error:
execute called with 1 bind variables when 0 are needed at
C:\sambar50\cgi-bin\dbi_demo.cgi line 71.

this is what I enter:
SELECT * FROM employees

What is wrong?
thanks again,
chris

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to