Subject Re: [IBO] CR in computed field
Author Helen Borrie
At 11:27 AM 29-10-01 +0000, hundri_106@... wrote:
>Hi,
>
>Is it possible to use CR/LF in computed fields? Eg
>Address_Line_1 || CRLF || Address_Line_2
>
>I cannot find the allowed commands anywhere :-(

You will need the bug-fixed (by Claudio in Firebird 1 beta 2 kit) version of ib_udf.dll with this function declared to your database:

DECLARE EXTERNAL FUNCTION ascii_char
INTEGER
RETURNS CSTRING(1) FREE_IT
ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf'

Then, in your SQL, something like this (the piece that's important is the concatenation phrase):

select 'alpha'||ascii_char(13)||ascii_char(10)||'beta'
as concat_field
from rdb$database

To accommodate a multi-line value, you will need to bind a TIB_Memo component to the computed column. Don't forget to set the COMPUTED attribute true in the dataset editor...

regards,
Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________