db_find_engine function

Prototype
unsigned short db_find_engine(
SQLCA * sqlca,
char * name );
Description

Returns an unsigned short value, which indicates status information about the local database server whose name is name. If no server can be found over shared memory with the specified name, the return value is 0. A non-zero value indicates that the local server is currently running.

If a null pointer is specified for name, information is returned about the default database server.

Each bit in the return value conveys some information. Constants that represent the bits for the various pieces of information are defined in the sqldef.h header file. Their meaning is described below.

  • DB_ENGINE   This flag is always set.

  • DB_CLIENT   This flag is always set.

  • DB_CAN_MULTI_DB_NAME   This flag is obsolete.

  • DB_DATABASE_SPECIFIED   This flag is always set.

  • DB_ACTIVE_CONNECTION   This flag is always set.

  • DB_CONNECTION_DIRTY   This flag is obsolete.

  • DB_CAN_MULTI_CONNECT   This flag is obsolete.

  • DB_NO_DATABASES   This flag is set if the server has no databases started.