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: "Denis J dot O'Connell" <denis at natural dot com>
Subject: Re: Problem with large text fields
Date: Jan 31 1996 2:03PM

> The malformed command header certainly comes from a Sybase error 
> displayed using the message handler, but without the appropriate 
>  tags. The error is probably due to the routines you use to 
> store the text. 
>  
> Can you post the code that you use to store the text (only that 
> portion should be necessary) 
>  

I am definitely using a "text" datatype in my Sybase Table.  My queries (with 
the large amounts of text) work if I build them and use them on command-line 
in Sybase, so I am thinking that the limit is either on the Sybperl side, or 
the HTML side.

Below is the code that I used to build the save query, and then execute the 
query.  I used the cgi-lib.pl Perl library to ReadParse the input from HTML 
into asscociative arrays called %in.  

Thanks,
Denis

$build="insert into Errors values (\"$in{'email'}\", $in{'people_id'}, \
"$date\", ";
@order=('desc', 'version', 'module', 'behavior', 'errortext', 'brief', 
'status', 'workaround', 'comments');

foreach $i (@order) {
    if ($i eq "comments") {
          if($in{$i}eq'null'){
              $build=$build." NULL";
          }
          else {
              $build=$build." \"$in{$i}\""; }
     }
     elsif ($in{$i}eq'null') {
       $build=$build." NULL,";
     }
     else {
       $build=$build." \"$in{$i}\",";
     }
}
$build=$build.")";

&dbcmd($dbproc, "$build");
&dbsqlexec($dbproc);
&dbresults($dbproc);


        Denis J. O'Connell       \_  \_  \_       denis@natural.com
  Natural Intelligence, Inc.     \_\_\_  \_       tel (617) 876-7680 x1257
                                 \_ \__  \_       fax (617) 492-7425
                                 \_  \_  \_