• 2 odgovora
  • 3.261 pregleda
testiranje UDF funkcije(Interbase) 13.08.2007. u 15:41 · pre 233 meseci #1
Kada napisem UDF f-ju u Interbase na sledeci nacin:

declare external function MaxNo
double precision,
double precision
returns double precision by value
entry_point 'MaxNo' module_name 'audf_lib.dll'

javlja mi se greska :'invalid request BLR at offset 59
Function MaxNo is not define'

Pretpostavljam da ta funkcija ne postoji u datom .dll fajl-u.

U cemu je problem?
Re: testiranje UDF funkcije(Interbase) 14.08.2007. u 13:06 · pre 233 meseci #2
> javlja mi se greska :'invalid request BLR at offset 59
> Function MaxNo is not define'
> Pretpostavljam da ta funkcija ne postoji u datom .dll fajl-u.

Postoji li ili ne? Dalje pokušaj da naziv dll fajla napišeš bez ekstenzije. Gde ti se nalazi .dll fajl? Pokušaj da ga staviš u UDF poddir IBa.
Potpis
Do not be a help vampire (http://slash7.com/pages/vampires), use the google.

How to ask questions the smart way:
http://www.catb.org/~esr/faqs/smart-questions.html
http://solair.eunet.rs/~fangor...stions/smart-questions.sr.html
Re: testiranje UDF funkcije(Interbase) 15.08.2007. u 15:45 · pre 233 meseci #3
Taj udf nisam koristio(min i max svakako vec postoje) ali probaj nesto ovako:

DECLARE EXTERNAL FUNCTION ABS
DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf';


takodje stoji u dokumentaciji:

InterBase provides a number of often-needed functions in the form of a UDF library,which is named ib_udf.dll
on Windows platforms and ib_udf on UNIX platforms. This library is in interbase_home/lib. These UDFs are all implemented using the standard C library. This section describes each UDF and provides its declaration.
IMPORTANT
Do not move the ib_udf file from its installed location unless you also move the
ib_util.dll file, located in the same directory. The ib_udf file requires the ib_util file to
function correctly.
There is a script,
ib_udf.sql
, in the
interbase_home
/
examples/udf
subdirectory that declares
all of the functions listed below. If you want to declare only a subset of these, copy and
edit the script file.
IMPORTANT
Several of these UDFs must be called using the new
FREE_IT
keyword if—and only if—
they are written in thread-safe form, using
malloc
to allocate dynamic memory.
Note
When trigonometric functions are passed inputs that are out of bounds, they return
zero rather than NaN.
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme