DB2Connection.ServerFunctionalLevel Property

Gets a string containing the functional level of the Db2® for z/OS® or LUW server to which the client is connected.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public ReadOnly Property ServerFunctionalLevel As String
[C#]
public string ServerFunctionalLevel {get;}
[C++]
public: __property String* get_ServerFunctionalLevel();
[JScript]
public function get ServerFunctionalLevel() : String;

Property value

The functional level of the connected Db2 for z/OS or LUW server.

Exceptions

Exception type Condition
InvalidOperationException The connection is closed.

Remarks

You can use the ServerFunctionalLevel property to determine the functional level of the Db2 for z/OS or LUW server to which the client is connected. The connection should be open to get the ServerFunctionalLevel property value.

Example

The following example creates a DB2®Connection and displays the ServerFunctionalLevel.

[Visual Basic]
Public Sub CreateDB2Connection()
     Dim myConnectString As String = "DATABASE=SAMPLE;"
     Dim myConnection As New DB2Connection(myConnectString)
     myConnection.Open()
     String ServFuncLvl = myConnection.ServerFunctionalLevel;
     myConnection.Close()
 End Sub

[C#]
public void CreateDB2Connection()
 {
    string myConnectString = "DATABASE=SAMPLE;";
    DB2Connection myConnection = new DB2Connection(myConnectString);
    myConnection.Open();
    String ServFuncLvl = myConnection.ServerFunctionalLevel;
    myConnection.Close();
 }