The mi_client() function
The mi_client() function dynamically determines whether a DataBlade® API module is running in the database server or as a client application.
Syntax
mi_integer mi_client()
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_client() function
tells a DataBlade API module
which implementation of the DataBlade API it
is using, as follows:
- C UDRs use the server-side implementation of the DataBlade API.
- Client LIBMI applications use the client-side implementation of the DataBlade API.
This function is useful in DataBlade API code that runs in both the server-side and client-side implementations of the DataBlade API.
Return values
- 0
- The DataBlade API module is running as a C UDR.
- 1
- The DataBlade API module is running as a client LIBMI application.
- MI_ERROR
- The function was not successful.