Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD::Sybase placeholder support

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Dan Wierenga" <dwierenga AT valueclick.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] DBD::Sybase placeholder support
  • Date: Fri, 9 May 2008 11:45:01 -0700

> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org [mailto:freetds-
> bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
>
> If you send me a TDSDUMP log, I hope I'd be able to tell you how it
> works.

Script and log attached.

> Could I ask you to test with 0.82, too? I'd love to announce this a
> new
> tested, confirmed feature (even though it began working some time
> back).
> I'd hate to announce it *used* to work and is now broken again. :-/

I'll see if I can install 0.82 soonish. I gave a brief try yesterday
and ran into some build problems; I'll try again when I have some time.



> Also, do output parameters work?

With my proc declared as:
create proc proc_foo (@moo datetime, @foo datetime output) as
begin select @foo = @moo; select * from dano; end

then

my $proc_sth = $dbh->prepare(q|
declare @foo datetime
exec proc_foo ?, @foo output
|);
$proc_sth->execute('2008-05-09 12:34:56');
{
while (my @foo = $proc_sth->fetchrow_array) {
print join(', ', @foo);
}
redo if $proc_sth->{syb_more_results};
}

prints the usual result set (from the select * from dano statement) and
prints the record from the 2nd recordset, which is the OUTPUT parameter.
The DBD::Sybase documentation is actually pretty good on this.


> I don't even know how that's supposed to work in Perl. See, that's
> what
> comes from not using placeholders. ;-)
>
> Many thanks. This is very cool.
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

Attachment: bar.pl
Description: bar.pl

Attachment: tds.log
Description: tds.log




Archive powered by MHonArc 2.6.24.

Top of Page