Re: Translation of strings/literals to varbinary?

"Peter C. Norton" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
I should mention that I'm testing this against SQL Server 2008r2.  I
would like to test this on sybase as well, but my prior problems with
connecting to Sybase ASE 15 with DBD::ODBC still stand.

-Peter

On Mon, Dec 06, 2010 at 06:38:07PM -0500, Peter C. Norton wrote:
> I'm wondering if there is any documentation on the expected behavior
> when a prepared statement is passed a representation of a varbinary?
> I'm asking because when using perl's DBD::Sybase linked to the sybase
> ctlib, I can set up the following prepared statement:
> 
>     my $sth = $dbh->prepare("SELECT foo_varbinary from db..mapped_value_map WHERE thing_id = ?");
>     
> I can then do the following, all of which return identical rows:
>     my $vbinary = "00038600be24829d";
>     $sth->execute(pack('H*', $vbinary);
> or
>     $sth->exeute($vbinary);
> or
>     $sth->execute("0x" . $vbinary);
> 
> However, when using DBD::ODBC via FreeTDS, only the first
> representation of the varbinary works.  Is this something that
> *should* work?  Or is the failure of the 2nd and 3rd forms an
> oversight?  Is there any documentation on what values/representations
> should be posible for doing this?
> 
> Thanks,
> 
> -Peter
>   
> 
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.