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: Sharif Islam <mislam at uiuc dot edu>
Subject: Re: DBD::Sybase datatype issue
Date: Apr 8 2008 8:21PM

Michael Peppler wrote:
> Sharif Islam wrote:
>> Michael Peppler wrote:
[..]
> 
> I guess that the binary string is kept in hex form, rather than in real 
> binary.
> 
> Try using pack() to create a true binary value, something like
> 
> $sth1->bind_param(1, pack('H*', $row[0]), SQL_BINARY);
> $sth1->execute;

This worked, as my string getting returned as text.

$sth1->bind_param(1, pack('A*', $row[0]), SQL_BINARY);

Also, I found another problem in the way I was using the stored 
procedure, fixed that, that might have been the initial problem. So it 
is working now. Thanks for the all help.

--s