Subject | ATTN Helen; Re: varchar(2048) holds 1012 |
---|---|
Author | Andrew |
Post date | 2004-01-01T16:57:42Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
instead of CSTRING(80), as reported on sourceforge.firebird-devel,
Sunday, 21 December 2003 7:33 PM by Jean Derrie Rigo? I tested it
and it appeared to be valid. From the newsgroup post:
-----
/* External Function declarations */
DECLARE EXTERNAL FUNCTION SUBSTR
CSTRING(80) CHARACTER SET NONE, SMALLINT, SMALLINT
RETURNS CSTRING(80) CHARACTER SET NONE FREE_IT
ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
I had this problem. Then I see the declaration :
/* External Function declarations */
DECLARE EXTERNAL FUNCTION STRLEN
CSTRING(32767) CHARACTER SET NONE
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';
I change de declaration of SUBSTR to make a test to this:
/* External Function declarations */
DECLARE EXTERNAL FUNCTION SUBSTR
CSTRING(200) CHARACTER SET NONE, SMALLINT, SMALLINT
RETURNS CSTRING(200) CHARACTER SET NONE FREE_IT
ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
and then it works. I don't know about the implementation of the
function but
I change to CSTRING(32767) and now the function works on any length
of
String...
----------------------------------------------------------------
Saudações,
Jean Derrie Rigo
----------------------------------------------------------------
-----
wrote:
> etc.) that might be causing the exception? The ib_udf stringfunctions
> have a known bug that none of them will accept strings longer than80
> bytes, making them useless for processing longer strings.Helen, wasn't that issue worked around by declaring CSTRING(32767)
instead of CSTRING(80), as reported on sourceforge.firebird-devel,
Sunday, 21 December 2003 7:33 PM by Jean Derrie Rigo? I tested it
and it appeared to be valid. From the newsgroup post:
-----
/* External Function declarations */
DECLARE EXTERNAL FUNCTION SUBSTR
CSTRING(80) CHARACTER SET NONE, SMALLINT, SMALLINT
RETURNS CSTRING(80) CHARACTER SET NONE FREE_IT
ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
I had this problem. Then I see the declaration :
/* External Function declarations */
DECLARE EXTERNAL FUNCTION STRLEN
CSTRING(32767) CHARACTER SET NONE
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';
I change de declaration of SUBSTR to make a test to this:
/* External Function declarations */
DECLARE EXTERNAL FUNCTION SUBSTR
CSTRING(200) CHARACTER SET NONE, SMALLINT, SMALLINT
RETURNS CSTRING(200) CHARACTER SET NONE FREE_IT
ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
and then it works. I don't know about the implementation of the
function but
I change to CSTRING(32767) and now the function works on any length
of
String...
----------------------------------------------------------------
Saudações,
Jean Derrie Rigo
----------------------------------------------------------------
-----