How to use a procedure to implement the interface to a Mobil

Posted by wardcouckecac on 10-Apr-2013 03:40

From the manual:

"However, external procedures must meet a basic requirement to be instantiated as singletons, and that is

they cannot contain any DEFINE PARAMETER  statements in the main block. They can

contain internal procedures and user-defined functions with their own parameters,

each of which can implement a Mobile operation exactly like a method of a class.

Note that the singleton coding requirement for external procedures applies only to an

external procedure that implements the interface for a Mobile resource and its

operations. Any additional procedures or classes that a singleton class or procedure

accesses can be implemented as any type of class or procedure that runs on the

AppServer."

How can I get this working with my attached procedure? It should implement the READ operation of the mobile app. You surely need to define an input parameter to receive the filter and an output parameter to return the dataset, but then it cannot be run as a singleton, so then u cannot use the procedure as an implementation of a mobile operation?

def_dscontactlight.i.zip

get_contacts.p.zip

All Replies

Posted by wardcouckecac on 10-Apr-2013 03:42

Also, the procedure returns a dataset with multiple related temptables, and the manual states that I have to create read operations for each of them. How can I implement this with this procedure?

Posted by Shelley Chase on 10-Apr-2013 07:18

That excerpt from the doc is confusing as written. The main block cannot have any parameters but all internal procs and udfs can.

Every resource (dataset) had a single read operation so you can read the data. You so not need one for each table although you can if you want. These would need to be marked as invoke operations.

Shelley

This thread is closed