These routines enable an application to initiate and terminate connections with Data Explorer. DXLStartDX establishes a connection *conn for a Data Explorer instance. It is through this connection that information is sent and received during a Data Explorer session.
The parameter port must be greater than or equal to zero. If host is specified as NULL, the function uses "localhost".
dx -image -mdf user.mdf
Note that you must specify either -image, -edit, or -menubar in order to bypass the Data Explorer Startup window. It is not possible to use DXLStartDX to start Data Explorer via the Startup window. The parameter *host is the name of the host on which Data Explorer is to be run. If specified as NULL, the local host is assumed.
The routine returns a pointer to a DXLConnection on success or it returns NULL and sets an error code (available in the global variable errno). The connection structure, specified by
typedef struct DXLConnection DXLConnection;
is the primary structure used by DXLink for maintaining information about the connection to the server. This DXLConnection is passed to most DXLink routines to indicate the relevant server connection.
To start the Data Explorer executive and connect DXLink to it, you might issue the following call:
DXLStartDX("dx -cache off -exonly");
The -exonly flag causes the executive to start up and to wait for a connection from DXLink. It is therefore required when connecting to the executive. Note that the "-script" option should not be used, as it causes the executive to start up in script mode, which requires commands typed directly at a prompt, bypassing the message system.
Similarly, a connection to the Data Explorer user interface can be initiated with the command:
DXLStartDX("dx -edit -mdf my.mdf -image");
[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]