The mi_routine_id_get() function

The mi_routine_id_get() accessor function returns the routine identifier for the user-defined routine that the specified function descriptor describes.

Syntax

mi_integer mi_routine_id_get(conn, funcdesc_ptr)
   MI_CONNECTION *conn;
   MI_FUNC_DESC *funcdesc_ptr;
conn
A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
funcdesc_ptr
A pointer to a function descriptor for a user-defined routine.
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_routine_id_get() function is one of the DataBlade® API functions of the Fastpath interface. It returns the routine identifier for the UDR that the funcdesc_ptr function descriptor describes. The routine identifier uniquely identifies a user-defined routine. The database server generates this identifier and stores it in the procid column of the sysprocedures system catalog table.
Tip: The DataBlade® API provides the mi_funcid data type for routine identifiers. The mi_funcid data type has the same structure as the mi_integer data type. For compatibility with earlier versions, mi_routine_id_get() continues to return a routine identifier as an mi_integer value.

Return values

>=0
The routine identifier of the routine that funcdesc_ptr identifies.
MI_ERROR
The function was not successful.