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: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: Problems with writing text
Date: Jan 25 1996 11:34AM

From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
> 
> From: mpeppler@itf.CH (Michael Peppler)
> > 
> > What happens is this:
> > When sybperl calls dbwritetext() internally, it asks the Perl
> > interpreter for the size of the data buffer that it must write. This
> > 'size' variable returns the internally allocated size, not necessarilly
> > the actual length of the buffer, so when a variable holding a text
> > buffer shrinks the &dbwritetext() call doesn't see it.
> 
> Err, are you sure that is the problem?
> 
> Here is the dbwritetext xsub.

I feel a little stupid :-)

I was sure that I tried both the perl4 and perl5 versions, and that I
had the same results. It turns out, as you correctly point out, that
this bug does not exist in perl5 (sybperl 2)...

So...

With sybperl 1.x and perl 4 it seems to be necessary to undefine the
variable to make sure that the correct length is passed to
dbwritetext(). In sybperl 2 /perl 5 this is handled correctly.

Sorry for the confusion.

Michael