🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: netscape.dev.livewire.programming
1 messages
1 total messages Started by David Hall Wed, 06 Dec 2000 00:00
Re: A 'Problem' with strings...
#1
Author: David Hall
Date: Wed, 06 Dec 2000 00:00
38 lines
2173 bytes
Informix only allows 256 chars at a time to be inserted into a 'char' or
'varchar' data type; you must break up the string into chunks before
inserting, and subscript the column name, like: infx-col[1,256] =
substr.js-var(0,255) -- check the syntax and do it in a loop.  also for
strings that big you should use the 'text' data type but that is even more
of a pain to work with.  else you could use a separate table to store this
data, and just store each (30K char) note/text field as separate informix
records at say 80 chars each.

at the very least use varchar so the string is not filled with spaces at
the end, but you will still get an error for a string > 256 chars.

david hall

Markku Lahti wrote:

> Hi all
>
> Does anybody know an easy way to handle empty spaces at the end of a
> string.
>
> I know trim-function, but it only handles strings up to 255 characters.
>
> I have a database table field(char) which may contain up to 30000
> characters.
> When I save there a 200 character string, the rest of the field is
> filled with 29800 empty spaces...
>
> So, am I doing something wrong...
>
> If not - what is the easiest way to get rid of those empty spaces ???
>
> Thanks in advance !
>
> I'm using Netscape SuiteSpot 3.0 on UNIX (HPUX-10.20)
> Database is  Informix.
>
> Markku ;-)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads