Subject | UDF function problem |
---|---|
Author | Aydin Turan |
Post date | 2002-11-15T15:33:12Z |
Hello All,
I wrote my own UDF library in Delphi for Firebird 1.0.
delphi code for function is below:
function GET_SMM_HIZMET_TESCIL(s:PChar):PChar; cdecl; export;
begin
if s = ('SMMHB') Then
GET_SMM_HIZMET_TESCIL:='SMMHB'
else
GET_SMM_HIZMET_TESCIL:='SMM';
end;
I declared below statment firebird for my database.
DECLARE EXTERNAL FUNCTION GET_SMM_HIZMET_TESCIL
CSTRING (15)
RETURNS CSTRING (5)
ENTRY_POINT 'GET_SMM_HIZMET_TESCIL' MODULE_NAME 'myUDFp.dll';
There isn't any problem these steps.
I created a calculate field which Metadata code is ''
SMM_SMMHB COMPUTED BY (GET_SMM_HIZMET_TESCIL(SMM.TESCIL_TIPI));'' .
not working correctly.
This Query is Get True Result
SELECT (GET_SMM_HIZMET_TESCIL('SMMHB')) from SMM;
But
which is the value in SMM table filed is not get correct
SELECT (GET_SMM_HIZMET_TESCIL(SMM.TESCIL_TIPI)) from SMM;
shortly if the function arguman is value like this fn('ASDASD') there isn't any
problem but if i use any field the result set isnot true.
What's the problem ? Please help me.
Thanks
[Non-text portions of this message have been removed]
I wrote my own UDF library in Delphi for Firebird 1.0.
delphi code for function is below:
function GET_SMM_HIZMET_TESCIL(s:PChar):PChar; cdecl; export;
begin
if s = ('SMMHB') Then
GET_SMM_HIZMET_TESCIL:='SMMHB'
else
GET_SMM_HIZMET_TESCIL:='SMM';
end;
I declared below statment firebird for my database.
DECLARE EXTERNAL FUNCTION GET_SMM_HIZMET_TESCIL
CSTRING (15)
RETURNS CSTRING (5)
ENTRY_POINT 'GET_SMM_HIZMET_TESCIL' MODULE_NAME 'myUDFp.dll';
There isn't any problem these steps.
I created a calculate field which Metadata code is ''
SMM_SMMHB COMPUTED BY (GET_SMM_HIZMET_TESCIL(SMM.TESCIL_TIPI));'' .
not working correctly.
This Query is Get True Result
SELECT (GET_SMM_HIZMET_TESCIL('SMMHB')) from SMM;
But
which is the value in SMM table filed is not get correct
SELECT (GET_SMM_HIZMET_TESCIL(SMM.TESCIL_TIPI)) from SMM;
shortly if the function arguman is value like this fn('ASDASD') there isn't any
problem but if i use any field the result set isnot true.
What's the problem ? Please help me.
Thanks
[Non-text portions of this message have been removed]