Translation of strings/literals to varbinary?

"Peter C. Norton" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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
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.