Server connection handle

BladeSmith calls mi_open() at the beginning of many of the routines it generates. The mi_open() call obtains a database server connection handle, which is a required argument in many DataBlade® API calls.

If your routine does not need a connection handle, remove the mi_open() and mi_close() functions that BladeSmith adds to your code.
Tip: If the only DataBlade API call your routine makes is to mi_db_error_raise(), you do not need a connection handle. You can pass a null value to mi_db_error_raise().

For routines running in the database server address space, except the large object DataBlade API routines, the connection handle enables client and database server routines to use the same DataBlade API routines.

When mi_open() is called at the beginning of a generated routine, mi_close() is called to release the handle immediately before the routine returns.