Posted in 1992
In article <Sep.9.14.37.38.1992.23046@gauss.rutgers.edu> manmetha@gauss.rutgers.edu (Rajesh Malhotra) writes: > >Fellow Informix'ers, > > In ESQL/C, when you retrieve a column of type char or varchar, >is the data padded with spaces at the end? Is there a way to >retrieve NULL terminated strings like a normal C program would >expect? > > Any and all responses appreciated, For strings of type char (I don't use varchar), the strings retrieved are padded with spaces. To avoid having strings padded, use the 'string' definition for the field; i.e. string filename[14]; This is documented in the RDSQL Data Types chapter of the ESQL/C Programmer's Manual for Version 2.10.
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.