Re: special chars in Strings
Posted in 1999
Topics: Data Types & Schema Design
theo If you are using CHAR or VARCHAR, you would need to change the special chars to text strings before insert. If you dont want to do this, you could look at the TEXT data type. If this is an internet application, you can simply convert \\r to '' (to take care of Unix browsers), then convert \\n to <BR>. All other non-alphamerics you can convert to the appropriate &hex_code; string. HTH Sujit gptheo@my-deja.com on 11/15/99 09:53:53 AM Please respond to gptheo@my-deja.com To: informix-list@iiug.org cc: (bcc: Sujit Pal) Subject: special chars in Strings Hi, I have to insert a string containing special chars into a field. I have some CR,LF and TAB in the strings and the informix won't insert them in the table. It's throwing with "Syntax Error". thanks theo Sent via Deja.com http://www.deja.com/ Before you buy.
In article <80ppm9$9mb$1@news.xmission.com>,
Sujit.Pal@bankofamerica.com wrote:
>
>
> theo
>
> If you are using CHAR or VARCHAR, you would need to change the
special chars to
> text strings before insert. If you dont want to do this, you could
look at the
> TEXT data type. If this is an internet application, you can simply
convert \\r to
> '' (to take care of Unix browsers), then convert \\n to <BR>. All other
> non-alphamerics you can convert to the appropriate &hex_code; string.
>
> HTH
> Sujit
>
Hi,
It didn't worked, or I didn't understand it.
I've tried :
Insert into myTable (id, name) values (0," that's all ");
After the execution, in the table is the string " that's all
", not the "that's all <CR><LF>"
I tried with other hex codes and still the same result.
Is there any escape character so I can insert something like that ?
thanks,
theo
Sent via Deja.com http://www.deja.com/
Before you buy.