Subject | Re: [firebird-support] How do you trim fetched char/varchar column? |
---|---|
Author | Ann W. Harrison |
Post date | 2006-04-13T15:16:30Z |
Jeff Lynn wrote:
filled. Use varchar instead. In the SQLDA, you can ask for
strings as CString, which is null terminated and will terminate
after the significant characters in the varchar. If you ask
for varchar, you get a two byte length of significant bytes, then
the string.
Regards,
Ann
>Yes. The SQL standard says that char is fixed length and blank
> In other commercial databse APIs that I used, the pSQLDA->sqllen
> contains the actual fetched data length returned. But in Firebird,
> this field returns the max. size of the column.
>
> Any idea?
filled. Use varchar instead. In the SQLDA, you can ask for
strings as CString, which is null terminated and will terminate
after the significant characters in the varchar. If you ask
for varchar, you get a two byte length of significant bytes, then
the string.
Regards,
Ann