Bagikan melalui


OracleConnection.ServerVersion Properti

Definisi

Mendapatkan string yang berisi versi server tempat klien terhubung.

public:
 property System::String ^ ServerVersion { System::String ^ get(); };
public:
 virtual property System::String ^ ServerVersion { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public string ServerVersion { get; }
[System.ComponentModel.Browsable(false)]
public override string ServerVersion { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ServerVersion : string
Public ReadOnly Property ServerVersion As String
Public Overrides ReadOnly Property ServerVersion As String

Nilai Properti

Versi server yang tersambung.

Atribut

Pengecualian

Koneksi ditutup.

Contoh

Contoh berikut membuat OracleConnection dan menampilkan beberapa properti baca-saja.

public void CreateOracleConnection()
{
    string connectionString = "Data Source=Oracle8i;Integrated Security=yes";
    using (OracleConnection connection = new OracleConnection(connectionString))
    {
        connection.Open();
        Console.WriteLine("ServerVersion: " + connection.ServerVersion
            + "\nState: " + connection.State);
    }
}
Public Sub CreateOracleConnection()
    Dim connectionString As String = "Data Source=Oracle8i;Integrated Security=yes"
    Using connection As New OracleConnection(connectionString)
        connection.Open()
        Console.WriteLine("ServerVersion: " & connection.ServerVersion _
           + ControlChars.NewLine + "State: " & connection.State)
    End Using
End Sub

Keterangan

Properti ServerVersion dalam format versi Oracle. Misalnya, format untuk rilis Oracle8 adalah string dalam bentuk "8.1.7.0.0 Oracle8 Release 8.1.7.0.0 - Produksi."

Berlaku untuk