OracleConnection.DataSource OracleConnection.DataSource OracleConnection.DataSource OracleConnection.DataSource Property


Ottiene il nome del server Oracle a cui connettersi.Gets the name of the Oracle server to which to connect.

 virtual property System::String ^ DataSource { System::String ^ get(); };
public override string DataSource { get; }
member this.DataSource : string
Public Overrides ReadOnly Property DataSource As String

Valore della proprietà

Il nome del server Oracle a cui connettersi.The name of the Oracle server to which to connect. Il valore predefinito è una stringa vuota ("").The default value is an empty string ("").


L'esempio seguente crea un OracleConnection e sono riportate alcune delle relative proprietà di sola lettura.The following example creates an OracleConnection and displays some of its read-only properties.

public void CreateOracleConnection()
    string connectionString = "Data Source=Oracle8i;Integrated Security=yes";
    using (OracleConnection connection = new OracleConnection(connectionString))
        Console.WriteLine("ServerVersion: " + connection.ServerVersion
            + "\nDataSource: " + connection.DataSource);
Public Sub CreateOracleConnection()
    Dim connectionString As String = _
       "Data Source=Oracle8i;Integrated Security=yes"

    Using connection As New OracleConnection(connectionString)
        Console.WriteLine("ServerVersion: " + connection.ServerVersion _
           + ControlChars.NewLine + "DataSource: " + connection.DataSource)
    End Using
End Sub

Si applica a

Vedi anche