executeTransientMethod

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

executeTransientMethod

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by ellenw >> Sun, 15 Jun 2003 22:44:38 GMT

Hi:
I'd like to use method executeTransientMethod. I have created "createTransientMethod" , and need pass 2 parameters to source but always got "Invalid parameter type" error. Does anyone know of this? The sample code as below.

source :="extract(_tempObj :TempObjects io;" & CrLf & " _obj : Fund) updating;" ..............

meth := process.createTransientMethod("extract", Fund, currentSchema, source, false, null, errorCode, errorPos, errorLength);

if meth <> null then
process.executeTransientMethod(meth,Fund, I HAVE NO IDEA HOW TO USE PARAMLISTTYPE HERE );
else
........
endif;


Thanks.
Ellen.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: executeTransientMethod

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by cnwdad1 >> Sun, 15 Jun 2003 23:37:59 GMT

Firstly, my guess is that the returnType parameter is the problem - you're sending "null"... try "String" instead, e.g.:

meth := process.createTransientMethod("extract", Fund, currentSchema, source, false, String, errorCode,
errorPos, errorLength);

My understanding is that when calling "executeTransientMethod", the parameter list is is dynamic and is only checked at run-time by the compiler - i.e. only send as many parameters as are defined in the method signature. In your example, there are two parameters, so you might have something like:

process.executeTransientMethod(meth, Fund, pTempObject, pObject);

.....the compiler will assess whether the number of parameters you provided matches the number of parameters that are defined in the method signature.

regards,
darrell.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: executeTransientMethod

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by allistar >> Mon, 16 Jun 2003 8:21:51 GMT

It is valid to have no return type. (I use these quite a bit in a few different JADE products, they are very handy and allow to to generate querieis that execute very fast).

As you have said, you simply pass as many parameters into process.executeTransientMethod as your transiwnt method expects.

Regards,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 24 guests