Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Wechsler, Steven M" <WechslerSM at bernstein dot com>
Subject: RE: more text questions
Date: Jan 27 1999 5:38PM

> -----Original Message-----
> From: Michael Peppler []
> Sent: Tuesday, January 26, 1999 6:01 PM
> To: SybPerl Discussion List
> Subject: RE: more text questions
> >>>>> "Steve" == Wechsler, Steven M  writes:
> Steve> Here's how I'm trying it (the CTlib option isn't available to
> Steve> me as all my code uses DBLib):
> Code snipped...
> Not sure what the problem is (and no time to really look), but the
> following does work:
> $dbh->sql("insert the_text_table(id, data) values(1, NULL)");
> $dbh->dbcmd("select data from the_text_table where id = 1");
> $dbh->dbsqlexec;
> $dbh->dbresults;
> $dbh->dbnextrow;
> $dbh->dbwritetext('', $dbh, 1, $data, TRUE);
> et voilą (the TRUE is for logging to be turned on).
> As you can see you can do this with only one open connection.
> Michael

OK, this doesn't work with Sybperl under ActivePerl on NT (I haven't tried
it yet on Unix).  It does, however, work if you replace the NULL in the
insert with an arbitrary text value (I tried this on a whim).  Any ideas?

I have another problem now.  When I try to read out the text using the
readtext example on your web page, it works fine until after it reads the
last chunk; then my message handler gets the error: "Attempt to initiate a
new SQL Server operation with results pending."  It exits the loop properly,
so I know it's getting the NO_MORE_ROWS value.  I could code my error
handler to ignore the error, but I'd rather fix it properly.  Suggestions?


Steve Wechsler/Senior DB Administrator/Sanford C. Bernstein & Co. 
"Never underestimate the power of human stupidity" - Lazarus Long
Support the Anti-SPAM amendment: