Programming Guide |
Verifies that a connection is open
#include <dmuproto.h>int dm_is_connection(char *connection_name);
connection_name
- Specifies a connection name that is declared in a
DBMS DECLARE CONNECTION
command.
- 1 True: Connection exists.
- 0 False: Connection does not exist, either because it was never declared or was closed.
#include <smdefs.h>
#include <dmuproto.h>
int free_resources()
{
if (dm_is_connection("work_connection"))
{
dm_dbms("close connection work_connection");
}
return 0
}