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: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: how can i update text/image thru. sybase
Date: Jul 15 1999 3:00PM

Christopher Luk writes:
 > hi,
 > i have posted this message once, i have made various modification, however, its
 > doesn't work out at all.
 > 
 > i have the following error message received while trying to update an
 > column on an text/image field. the syntax is copying from the syperl perl
 > manual. i can use "insert into...." to insert char, int into a table, but
 > it seems not work for text/image, so that i dig into the manual and found
 > something like the following script. however, i spend half day tring
 > differe parameter but still can't make it work. please advise.

Well I don't know what $cmd is exactly, but the following code works
fine for me:

$dbh->dbcmd("insert Waiting_List (id, introduction) values(1, '')");
$dbh->dbsqlexec;
$dbh->dbresults;
$dbh->dbcmd("select introduction from Waiting_List where id = 1");
$dbh->dbsqlexec;
$dbh->dbresults;
$dbh->dbnextrow;
$dbh->dbwritetext('Waiting_List.introduction', $dbh, 1, "THis is the
text that gets inserted...", TRUE);

You probably want to add appropriate error checking, though...

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com