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: "Sheree A dot Hemphill" <sah18 at po dot cwru dot edu>
Subject: RE: text field insertion being truncated
Date: Aug 30 1999 2:56PM

michael, thank you!
that was exactly the problem.
sheree

> -----Original Message-----
> From: owner-SYBPERL-L@listproc.net
> [mailto:owner-SYBPERL-L@listproc.net]On Behalf Of Michael Peppler
> Sent: Monday, August 30, 1999 10:33 AM
> To: SybPerl Discussion List
> Subject: Re: text field insertion being truncated
> 
> 
> Sheree A. Hemphill writes:
>  > I have a series of text files that I need to insert as records 
> into a text
>  > field.  I am using the following stops to accomplish the insert:
>  > 
>  > I open the text file to be inserted.
>  > I copy the contents into an array:
>  > 	@genbank = ;
>  > 
>  > Then I insert the text into field TEXT (along with a variable 
> for field AC)
>  > as follows:
>  > 	if ($fn ne "error") {
>  > 		$dbh->ct_sql("insert into SOURCESEQ (AC, TEXT) values
>  > ('$fn','@genbank')");
>  > 	}
>  > 
>  > I close the file & repeat the above steps for a series of these file.
>  > 
>  > The problem I am having, is that the text I am inserted gets 
> truncated when
>  > I look at the field in sybase.  Is there a maximum that 
> sybperl is able to
>  > transfer with the above query?  Any other ideas on why this might be
>  > happening?
> 
> Normally the insert should be happening just fine, but Sybase limits
> the size of TEXT fields to 32k by default when you SELECT them. You
> can change this limit by using the SET TEXTSIZE xxxx command. See
> the SET command in the Transact-SQL command reference manual.
> 
> 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
> 
>