[freetds] DBD::Sybase placeholder support

James K. Lowden jklowden at freetds.org
Thu May 8 22:53:05 EDT 2008


Dan Wierenga wrote:
> 
> I tested with perl 5.8.8, DBI 1.52, DBD::Sybase 1.105, FreeTDS 0.64, and
> Sql Server 2000 and 2005.
> 
> Something I'm curious about though... HOW does this work?  Is it because
> Microsoft has suddenly developed support for server-side placeholders?
> I checked the $dbh->{syb_dynamic_supported} attribute, which reports
> true against my servers.  Unfortunately I can't say I ever checked that
> value against any older versions of Sql Server so I've no idea if it's
> suddenly "new and improved".

Holy cow, Dan!  Really, I never thought I'd see the day.    

If you send me a TDSDUMP log, I hope I'd be able to tell you how it works.
 I don't know the ct-lib API very well, and I never programmed to its
parameter functions, so I don't know how it's supposed to work.  But at
least I'll be able to tell you -- well, really, you'll be able to see for
yourself -- what functions are being called, how the information is being
transmitted to the server.  

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.  :-/

Also, do output parameters work?  Strings, floats?  Somthing like

	create proc P 
		@d datetime = getdate() OUTPUT 
	as 
		select @d = datediff( day, -1, @d )
		return

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



More information about the FreeTDS mailing list