PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: DBD::Sybase stored proc parameter binding doesn't work to bind just some parameters
Date: Jun 11 2004 1:45PM

On Fri, 2004-06-11 at 14:44, Avis, Ed wrote:
> I know that the bind parameter support for stored procedures in
> DBD::Sybase is experimental but anyway I hope this bug report will be
> useful.  Make a procedure:
> 
>     create procedure foo @a int, @b int as print "hello"
>     grant execute on foo to whoever

>     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 would welcome any patches that makes the parsing of parameters better
to make hard-coded parameters work correctly in this situation.

Alternatively I'll just document that this doesn't work...

:-)

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html