Error -280...Help!!! 
Author Message
 Error -280...Help!!!

I'm running SE 5.01 for SCO under Linux ;)

I have a char(600) field that I'm trying to perform
INSERT and UPDATE on but I'm getting error -280.
(I've tried both isql and ESQL/C)

How do I solve this STUPID limitation about 256
characters of Informix.

If anyone out there knows why this limitation exists,
please feel free to explain it to me!!!

/Anders

-----------------------------------------------------
 Name:          Anders "Welle" Welen

-----------------------------------------------------
 WWW Homepage:   http://www.***.com/ ~anwe
-----------------------------------------------------



Wed, 18 Jun 1902 08:00:00 GMT
 Error -280...Help!!!

:I'm running SE 5.01 for SCO under Linux ;)

:I have a char(600) field that I'm trying to perform
:INSERT and UPDATE on but I'm getting error -280.
:(I've tried both isql and ESQL/C)

:How do I solve this STUPID limitation about 256
:characters of Informix.

:If anyone out there knows why this limitation exists,
:please feel free to explain it to me!!!

I don't know why the limitation is there, nor do I care, I have never
hit it so far. I simply use a variable instead. I don't know the
syntax for it in C (i program only in 4GL), but it is possible in C as
well.
To hit this limitation in isql you would have to either realy type a
lot (which I would use another tool for) or have externally generated
statements. There is a way around this too, but I don't remember it
for sure. May be concatenation works? The operator is || (two virtical
bars).


NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company



Wed, 18 Jun 1902 08:00:00 GMT
 Error -280...Help!!!

Quote:

>Date: Fri, 13 Sep 1996 10:20:08 +0100
>X-Informix-List-Id: <news.28025>

>I'm running SE 5.01 for SCO under Linux ;)

>I have a char(600) field that I'm trying to perform
>INSERT and UPDATE on but I'm getting error -280.
>(I've tried both isql and ESQL/C)

>How do I solve this STUPID limitation about 256
>characters of Informix.

The limitation is on character literal strings, not on string variables.
ISQL Perform should be OK -- it uses dynamically allocated variables in
its work.  But using the ISQL Query Language option you'd type:

UPDATE SomeTable SET Char600Field = '...more than 256 characters...'

and this will fail (in all languages) because the literal is too long.

In ESQL/C, though, you could do:

EXEC SQL BEGIN DECLARE SECTION;
char *newval;
EXEC SQL END DECLARE SECTION;
newval = "...more than 256 characters...";

EXEC SQL UPDATE SomeTable SET Char600Field = :newval;

and you will not get the error.

Quote:
>If anyone out there knows why this limitation exists,
>please feel free to explain it to me!!!

Once upon a long time ago, the world was a smaller place, and 256
character strings broke editors and things.  Fortunately, the world
has grown up since then and this is now a nuisance.  The reason is
one of the oldest in the software game -- historical.  That doesn't
make it good.

Yours,

PS: I just tried the following code (there are 600 X's in a row) on
7.20.UC1 and got the errors:

esqlc: "kk.ec", line 6: Error -33020: Line is too long.
esqlc: "kk.ec", line 6: Error -33017: Incomplete statement.
2 error(s) found

cat kk.ec
main()
{
$DATABASE APT;
$CREATE TEMP TABLE X (Y CHAR(600));
$INSERT INTO X VALUES('A');
$UPDATE X SET Y =
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
printf("%d\n", sqlca.sqlcode);
exit(0);

Quote:
}



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Error 280: A quoted string exceeds 256 bytes.

2. error 280, quoted string exceeds 256 bytes...

3. 280 error

4. VFP5.0 Distribution setup error 280

5. Sybase 10 on Sun 4/280?

6. D3/NT Upgrade 280

7. D3/NT patch 280 - still

8. Problems with D3/NT patch 280

9. help,help,help,help,help,help,help,help,help,help,help,help,help,

10. Help Help Help Oracle Error Message ORA-01041

11. error 710 - help - help -help

12. FW: error 710 - help - help -help


 
Powered by phpBB® Forum Software