String length exceeding 256 bytes (error 280)
Posted in 2004
Topics: Server Administration
--0-528180686-1087797746=:18746
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hello,
A table with four fields has the schema:
int
int
int
char (4096)
The sample query I should run is something like...
INSERT INTO tablename values (1, 2, 3, ".............");
There was a problem inserting a string that ran into multiple lines,
with DBAccess, which complained
that the quoted string was beyond 256 bytes
length.
I wrote a file with the "INSERT" query
as the text and used dbaccess at the
command prompt, which flashed the same
error.
Here goes the session....
/home/me/>dbaccess mydatabase insert.sql
Database selected.
280: A quoted string exceeds 256 bytes.
Error in line 1Near character position 51
Database closed.
/home/me/>finderr 280
-280 A quoted string exceeds 256 bytes.
Somewhere in this statement there is a character literal that exceeds
the maximum allowed. Inspect the statement, checking the
punctuation and length of all quoted strings. Possibly two quotes
are missing, making a long string out of two short ones. If you
intended to use a string of this length, you will have to revise the
statement. There is no means for writing such a long character string
in an SQL statement
Any means to get it done?
Thanks
---------------------------------
ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself
--0-528180686-1087797746=:18746
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<DIV>
<DIV>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>A table with four fields has the schema:</FONT></DIV>
<DIV> </DIV>
<DIV>int </DIV>
<DIV>int </DIV>
<DIV>int</DIV>
<DIV>char (4096)</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The sample query I should run is something like...</FONT></DIV>
<DIV> </DIV>
<DIV>INSERT INTO tablename values (1, 2, 3, ".............");</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>There was a problem inserting a string that ran into multiple lines,</FONT></DIV>
<DIV><FONT face=Arial size=2>with DBAccess, which complained</FONT></DIV>
<DIV><FONT face=Arial size=2>that the quoted string was beyond 256 bytes</FONT></DIV>
<DIV><FONT face=Arial size=2>length. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I wrote a file with the "INSERT" query </FONT></DIV>
<DIV><FONT face=Arial size=2>as the text and used dbaccess at the </FONT></DIV>
<DIV><FONT face=Arial size=2>command prompt, which flashed the same </FONT></DIV>
<DIV><FONT face=Arial size=2>error.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here goes the session....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>/home/me/>dbaccess mydatabase insert.sql</FONT></DIV>
<DIV><FONT color=#ff0000></FONT> </DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><FONT color=#0000ff>Database selected</FONT>.</FONT></DIV>
<DIV><FONT color=#ff0000></FONT> </DIV><FONT face=Arial size=2>
<DIV><BR><FONT color=#ff0000> 280: A quoted string exceeds 256 bytes.<BR>Error in line 1<BR>Near character position 51</FONT></DIV>
<DIV><FONT color=#ff0000></FONT> </DIV>
<DIV><FONT color=#ff0000><FONT color=#0000ff>Database closed</FONT>.</FONT></DIV>
<DIV><FONT color=#ff0000></FONT> </DIV>
<DIV><FONT color=#ff0000></FONT> </DIV>
<DIV><FONT color=#0000ff>/home/me/>finderr 280</FONT></DIV>
<DIV><FONT color=#0000ff></FONT><FONT color=#0000ff></FONT><FONT color=#0000ff></FONT><BR><FONT color=#ff0000>-280 A quoted string exceeds 256 bytes</FONT>.</DIV>
<DIV> </DIV>
<DIV><FONT color=#800000>Somewhere in this statement there is a character literal that exceeds <BR>the maximum allowed. Inspect the statement, checking the <BR>punctuation and length of all quoted strings. Possibly two quotes <BR>are missing, making a long string out of two short ones. If you <BR>intended to use a string of this length, you will have to revise the <BR>statement. There is no means for writing such a long character string <BR>in an SQL statement</FONT></DIV>
<DIV><FONT color=#ff0000></FONT> </DIV>
<DIV><FONT color=#ff0000></FONT> </DIV>
<DIV>Any means to get it done?</DIV>
<DIV> </DIV>
<DIV>Thanks</FONT></DIV></DIV></DIV><p>
<hr size=1> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://uk.rd.yahoo.com/evt=21626/*http://uk.messenger.yahoo.com"><strong>ALL-NEW
Yahoo! Messenger</strong></a><strong> - <font color="#FF9900"><em>sooooo many
all-new ways to express yourself</em></font></strong></font>
--0-528180686-1087797746=:18746--
sending to informix-list
Gopi Krishna wrote:
> A table with four fields has the schema:
>
> int
> int
> int
> char (4096)
>
> The sample query I should run is something like...
>
> INSERT INTO tablename values (1, 2, 3, ".............");>
> There was a problem inserting a string that ran into multiple
> lines, with DBAccess, which complained that the quoted string was
> beyond 256 bytes length.
Which version of what are you using on which platform?
> [...]
> /home/me/>finderr 280
>
> -280 A quoted string exceeds 256 bytes.
>
> Somewhere in this statement there is a character literal that exceeds
> the maximum allowed. Inspect the statement, checking the
> punctuation and length of all quoted strings. Possibly two quotes
> are missing, making a long string out of two short ones. If you
> intended to use a string of this length, you will have to revise the
> statement. There is no means for writing such a long character string
> in an SQL statement
>
>
> Any means to get it done?
In DB-Access, use the LOAD statement. That is, if you are using an
old version and cannot upgrade. I think that limit has been lifted in
more recent versions - but I haven't checked today to make sure.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
On Mon, 21 Jun 2004 07:02:26 +0100 (BST), Gopi Krishna
<informixprogrammer@yahoo.co.uk> wrote:
>
>--0-528180686-1087797746=:18746
>Content-Type: text/plain; charset=iso-8859-1
>Content-Transfer-Encoding: 8bit
>
>Hello,
>
>A table with four fields has the schema:
>
>int
>int
>int
>char (4096)
>
>The sample query I should run is something like...
>
>INSERT INTO tablename values (1, 2, 3, ".............");>
>There was a problem inserting a string that ran into multiple lines,
>with DBAccess, which complained
>that the quoted string was beyond 256 bytes
>length.
>
>I wrote a file with the "INSERT" query
>as the text and used dbaccess at the
>command prompt, which flashed the same
>error.
>
>Here goes the session....
>
>/home/me/>dbaccess mydatabase insert.sql
>
>Database selected.
>
>
> 280: A quoted string exceeds 256 bytes.
>Error in line 1>Near character position 51
>
>Database closed.
>
>
>/home/me/>finderr 280
>
>-280 A quoted string exceeds 256 bytes.
>
>Somewhere in this statement there is a character literal that exceeds
>the maximum allowed. Inspect the statement, checking the
>punctuation and length of all quoted strings. Possibly two quotes
>are missing, making a long string out of two short ones. If you
>intended to use a string of this length, you will have to revise the
>statement. There is no means for writing such a long character string
>in an SQL statement
>
>
>Any means to get it done?
>
>Thanks
>
Set the onconfig parameter allow_newline to 1
(This is documented for IDS 9.3, but I think it also works for IDS 7.3)
Joachim.
--
This post is free post; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
Joachim Verhagen (jcdverha@xs4all.nl)
WWW http://www.xs4all.nl/~jcdverha/ (Science Jokes)
Split the large string into sections, each of them within 256 bytes, and
concatenate them using the "||" operator, as follows:
INSERT INTO tablename values (
1, 2, 3,
"............." ||
"............." ||
"............." ||
"............." ||
"............." ||
"............."
);
--
Regards,
Doug Lawry
www.douglawry.webhop.org
"Gopi Krishna" <informixprogrammer@yahoo.co.uk> wrote:
> Hello,
>
> A table with four fields has the schema:
>
> int
> int
> int
> char (4096)
>
> The sample query I should run is something like...
>
> INSERT INTO tablename values (1, 2, 3, ".............");>
> There was a problem inserting a string that ran into multiple lines,
> with DBAccess, which complained
> that the quoted string was beyond 256 bytes
> length.
>
> I wrote a file with the "INSERT" query
> as the text and used dbaccess at the
> command prompt, which flashed the same
> error.
>
> Here goes the session....
>
> /home/me/>dbaccess mydatabase insert.sql
>
> Database selected.
>
> 280: A quoted string exceeds 256 bytes.
> Error in line 1> Near character position 51
>
> Database closed.
>
> /home/me/>finderr 280
>
> -280 A quoted string exceeds 256 bytes.
>
> Somewhere in this statement there is a character literal that exceeds
> the maximum allowed. Inspect the statement, checking the
> punctuation and length of all quoted strings. Possibly two quotes
> are missing, making a long string out of two short ones. If you
> intended to use a string of this length, you will have to revise the
> statement. There is no means for writing such a long character string
> in an SQL statement
>
> Any means to get it done?
>
> Thanks
Related threads
- Conversion to differeent characters sets
- Problem in changing locale via dbexport/dbimport
- RE: openlink error "Unable to load locale categories"