|
|
sybperl-l Archive
Up Prev Next
From: "Avis, Ed" <avised at kbcfp dot com>
Subject: RE: DBD::Sybase stored proc parameter binding doesn't work to bindjust some parameters
Date: Jun 11 2004 3:12PM
Michael Peppler wrote:
>> my $sth = $dbh->prepare('exec foo @a = 1, @b = ?');
>
>This won't work - because the (very simplistic) parser that checks to
>see what sort of parameters are passed doesn't see the first
>parameter (@a), and so only sends the second parameter.
I can't find the prepare() code but I thought that it would work by
string substitution, replacing each ? with an (appropriately quoted)
value. Or by creating a temporary stored proc as mentioned in the
docs, again just brute-force replacing ? with parameter names.
Do you mean it really tries to parse the SQL and work out the
procedure name and the names of each parameter?
--
Ed Avis
|