|
Udf Interbase 7.1
--------------------------------------------------------------------------------
HOLA A TODOS
TENGO ESTE CODIGO ESCRITO EN DELPHI ( CREANDO UNA DLL )
library Project1;
uses
SysUtils,
StrUtils,
Classes;
{$R *.res}
type
tibdate = record
days, frac : integer;
end;
function strzero( var n , t : integer ) : String ; cdecl;export;
var
ceros, entero_char : String;
begin
ceros := '000000000000000000000000000000';
entero_char := Trim( inttostr(n) );
Result := rightstr( ceros + entero_char, t);
end;
end.
Y EL *.DLL RESULTADO SE HA COPIADO EN EL DIRECTORIO DE INTERBASE \UDF\ EN EL SERVIDOR
EN LA BASE DE DATOS CREE UNA UDF DE LA SGTE MANERA
DECLARE EXTERNAL FUNCTION STRZERO_
INTEGER,
INTEGER
RETURNS CSTRING (255) FREE_IT
ENTRY_POINT 'strzero' MODULE_NAME 'project1.dll';
pero cuando escribro este codigo :
select strzero_( fid, 3) as pp from pr_cons
( fid es un campo de la tabla PR_CONS; 3 ES UN PARAMETRO )
AL COMPILAR TENGO ESTE ERROR
fmSQLEditor.Query:
Invalid token.
invalid request BLR at offset 63.
function STRZERO_ is not defined.
module name or entrypoint could not be found.
S.O.S SOCORRRO NECESITO SU AYUDA X FVR........
DE ANTEMANO LES AGRADEZCO.. A TODOS...
P.D. ESTOY CON INTERBASE 7.1
|