srv_enable(),srv_enable_ex(),dp4_srv_enable()

Purpose

Opens the system database and performs other necessary initialisations for a new connection to DP4

Old name

#define _srvinit srv_enable

Syntax

void srv_enable(void)
void srv_enable_ex(int file_only)

Syntax (DP4DBAPI)

int dp4_srv_enable(CONN * conn,int file_only)

Parameters

CONN * conn

Handle returned by preceding call to dp4_srv_connect()

 

int file_only

If TRUE database functionality is disabled. You might set this if the application does not use the DP4 database interface, but just the DP4 file handling functions. For example SYSDB uses a file only connection so that it can update dp4.sys without encountering an error because of a missing system database or similar error.

Description

The srv_enable() function performs various initialisations for a new connection to DP4. It is normally called immediately after a connection handle has been obtained with srv_init_process().

For dp4_srv_enable() the return value is TRUE if the connection is succesfully initialised and FALSE otherwise. For srv_enable() and srv_enable_ex() there is no return value - a sys_fail() or sys_error() will have been generated to terminate the application if there is a problem with initialising the connection (for instance, because the system database is missing or corrupt).

See also

srv_connect(), srv_init_process(), srv_disable()