Re: NULL in TEXT?
Posted in 1998
Roger Tomas wrote: > Is it possible to store a NULL character in the middle of a > TEXT field value? What happens when you attempt to > retrieve the value via ESQL/C - do you get a truncated > value? > > Is there any way to get rid of the NULL characters short > of writing an ESQL/C program to scan every character in > every row? > > If I have to do this, can I use the 'loc_size' field in the > locator structure as the length of the string to scan to > as opposed to the end of string as indicated by the > presence of a NULL character? > > Any insights greatly appreciated. TIA. > > Roger Tomas > AG Communication Systems Roger, I think it will work although I have never tested it. The documentation says: "A TEXT value can include tabs, spaces, and other nonprintable characters. However, you must use an Informix SQL API to insert the nonprintable characters into ....". I know for sure it works with CHAR type columns. As long as the NULL character is not the first character of the value (designates NULL value). Regards -- Helmut Leininger Bull AG / Vienna Unix Support Email: Helmut.Leininger@bull.net "This opinion is mine and not necesserily that of my employer. No guarantees whatsoever."