IDalConnection2.ServerMode

Syntax

ServerMode: DalServerMode;

Description

The ServerMode property returns the type of DBMS server, with which connection is established.

Comments

If connection is established by means of one of the OLE DB drivers installed in the operating system, the Driver property returns OLEDB. In this case the ServerMode property enables the user to determine a type of DBMS family, which driver was used.

NOTE. The property does not return particular driver model.

Example

Sub CheckServer(Connection: IDalConnection2);
Begin
    If Connection.Driver = "OLEDB" Then
        Select Case Connection.ServerMode
            Case DalServerMode.ORCL: //Further work with connection and creating of queries with Oracle syntax
            Case DalServerMode.MSSQL: //Further work with connection and creating of queries with Microsoft SQL Server syntax
            //...
            //Checking other types…
            //...
        End Select;
    End If;
End Sub CheckServer;

The specified function can be used to check the type of DBMS server if connection is established by means of any of OLE DB drivers.

See also:

IDalConnection2