home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.informix
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!cbnews!cbnewsm!seeb
- From: seeb@cbnewsm.cb.att.com (Dick Seebach)
- Subject: Re: ESQL/C Question -- char or varchar columns padded?
- Organization: AT&T Bell Labs, Warren NJ
- Distribution: usa
- Date: Thu, 10 Sep 1992 11:45:22 GMT
- Message-ID: <1992Sep10.114522.5054@cbnewsm.cb.att.com>
- Keywords: char type, varchartype, strings not null terminated?
- References: <Sep.9.14.37.38.1992.23046@gauss.rutgers.edu>
- Sender: Dick Seebach
- Lines: 21
-
- 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.
-