After searching a lot on the ibmsite and googling a lot, i still dont
know how to execute a memberfunction in an udf.
Example:
-----------A.h --------------
class A
{
public:
void run();
}
------------udf.c------------
#include "sqludf.h"
#include "A.h"
SQL_API_RC SQL_API_FN run ( SQLUDF_VARCHAR* out,
SQLUDF_NULLIND* outnul,
SQLUDF_TRAIL_ARGS )
{
A a;
a.run();
strcpy(out,"done");
}
----------------------------
After bldrtn and
create function run () returns varchar(80)
external name 'udf!run'
language C
parameter style SQL
;
I get the error running[select run() from R]:
SQL0444N Routine "BEN.RUN" (specific name "SQL040526125305300") is
implemented with code in library or path ".../sqllib/function/A",
function
"run" which cannot be accessed. Reason code: "6". SQLSTATE=42724.
Paul Cowell