OracleConnectionStringBuilder.Item[String] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定與指定索引鍵相關聯的值。 在 C# 中,這個屬性就是索引器。
public:
virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ keyword); void set(System::String ^ keyword, System::Object ^ value); };
public override object this[string keyword] { get; set; }
member this.Item(string) : obj with get, set
Default Public Overrides Property Item(keyword As String) As Object
參數
- keyword
- String
要取得或設定的物品鑰匙。
屬性值
與指定鍵相關聯的值。
例外狀況
嘗試新增一個不存在於可用金鑰中的金鑰。
連接字串中的無效值(具體來說,當預期會輸入布林值或數字值但未提供時)。
備註
由於 包含 OracleConnectionStringBuilder 固定大小的字典,嘗試新增字典中不存在的鍵值會拋 KeyNotFoundException出 。 下表列出了 連接字串 內所有可能的鍵值,以及每個鍵的預設值。
| Key | 房產 | 預設值 |
|---|---|---|
| 資料來源(或伺服器) | DataSource | 空字串 |
| 持續保存安全資訊(或稱持續安全資訊) | PersistSecurityInfo | 否 |
| 整合式安全性 | IntegratedSecurity | 否 |
| 使用者識別碼(或使用者或 UID) | UserID | 空字串 |
| Password | Password | 空字串 |
| 入伍 | Enlist | 沒錯 |
| 資源整合 | Pooling | 沒錯 |
| 最小池數 | MinPoolSize | 0 |
| 最大池數 | MaxPoolSize | 100 |
| 省略 Oracle 連線名稱 | OmitOracleConnectionName | 否 |
| Unicode | Unicode | 否 |
| 負載平衡逾時(或連線壽命) | LoadBalanceTimeout | 0 |