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: Steve Sabljak <steve at cpc dot net dot au>
Subject: Re: Insertion of BINARY/VARBINARY values with DBD::Sybase?
Date: Aug 4 2001 12:41AM

It works nicely now. I owe you a debt of gratitude. Thank you Michael.

Thanks again,
-Steve
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Sabljak
Web Developer
The Cooee Phone Company Pty Ltd

> 
> Michael Peppler writes:
>  > Steve Sabljak writes:
>  >  >      $rawstr = pack("H*", "110011");
>  >  >      $sth = $dbh->prepare("insert into sometable (bin) values (?)");
>  >  >      $sth->execute($rawstr);
>  >  > 
>  >  >      The value 0x11 is inserted when what I want is 0x110011.
>  >  >      It's truncated at the first nul byte.
>  >  > 
>  >  > Does the current version of DBD::Sybase support insertion of BINARY/VARBINARY
>  >  > values using placeholders?
>  > 
>  > It's a bug in DBD::Sybase. I'll have a fix for you in a bit.
> 
> Here's a patch - apply to dbdimp.c
> 
> I should have a new version of DBD::Sybase out soon.
> 
> Michael
> -- 
> Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
> mpeppler@peppler.org - mpeppler@mbay.net
> International Sybase User Group - http://www.isug.com