Subject FB 1.5 : UDF Access violation (not in FB 1.0)
Author vs_20100
Hello all,

I was happily using some functions from a UDF that I have made, with
Firebird 1.0. Unfortunately, at least one of the functions crashes
the Firebird 1.5 server with the message :

Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the Firebird server
to terminate abnormally.

the function written with Delphi 6 is very simple :

function GetStrLen(const text:PChar):integer;
begin
result := StrLen(text);
end;

it is called from a trigger as :

CREATE TRIGGER AI_PREST_1_TXT
FOR WPP_Prestations ACTIVE AFTER INSERT POSITION 0
AS
DECLARE VARIABLE TextLength INTEGER;
BEGIN
TextLength = GetStrLen(new.texte_fr);
END

texte_fr is a VARCHAR(30)


What's wrong here ?
Also, is there a better way to know the length of a string field
without calling an external function ?

Thanks for your help,
Sincerely,
Vincent Schmid
vschmid@...