Up Prev Next
From: "Wechsler, Steven M" <WechslerSM at bernstein dot com>
Subject: RE: more text questions
Date: Jan 28 1999 3:51PM
(this didn't make it through the first time for some reason, so I'm trying
> -----Original Message-----
> From: Michael Peppler [mailto:email@example.com]
> 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->dbwritetext('the_text_table.data', $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.
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: http://www.cauce.org