/// <summary>コネクションの確立</summary> /// <param name="connstring">接続文字列</param> /// <remarks>必要に応じて利用する。</remarks> public override void ConnectionOpen(string connstring) { // コネクションをオープン this._cnn = new HiRDBConnection(connstring); this._cnn.Open(); }
/// <summary> /// コネクション オープン /// </summary> private void ConnectionOpen() { if (this.rbnSQL.Checked) { this.SqlCn = new SqlConnection(this.txtConnString.Text); this.SqlCn.Open(); } else if (this.rbnOLE.Checked) { this.OleCn = new OleDbConnection(this.txtConnString.Text); this.OleCn.Open(); } else if (this.rbnODB.Checked) { this.OdbCn = new OdbcConnection(this.txtConnString.Text); this.OdbCn.Open(); } else if (this.rbnODP.Checked) { this.OdpCn = new OracleConnection(this.txtConnString.Text); this.OdpCn.Open(); } else if (this.rbnDB2.Checked) { this.DB2Cn = new DB2Connection(this.txtConnString.Text); this.DB2Cn.Open(); } else if (this.rbnHiRDB.Checked) { this.HiRDBCn = new HiRDBConnection(this.txtConnString.Text); this.HiRDBCn.Open(); } else if (this.rbnMySQL.Checked) { this.MySqlCn = new MySqlConnection(this.txtConnString.Text); this.MySqlCn.Open(); } else if (this.rbnPstgrs.Checked) { this.NpgsqlCn = new NpgsqlConnection(this.txtConnString.Text); this.NpgsqlCn.Open(); } else { // データプロバイダ指定無し(ありえない) } }