OracleConnection.DataSource Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the name of the Oracle server to which to connect.
public:
property System::String ^ DataSource { System::String ^ get(); };
public:
virtual property System::String ^ DataSource { System::String ^ get(); };
public string DataSource { get; }
[System.ComponentModel.Browsable(false)]
public override string DataSource { get; }
member this.DataSource : string
[<System.ComponentModel.Browsable(false)>]
member this.DataSource : string
Public ReadOnly Property DataSource As String
Public Overrides ReadOnly Property DataSource As String
Property Value
The name of the Oracle server to which to connect. The default value is an empty string ("").
- Attributes
Examples
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))
{
connection.Open();
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)
connection.Open()
Console.WriteLine("ServerVersion: " + connection.ServerVersion _
+ ControlChars.NewLine + "DataSource: " + connection.DataSource)
End Using
End Sub
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.