Exemplo n.º 1
0
 /// <summary>
 /// Constructor, accepts the Parameters for the database connection
 /// </summary>
 /// <param name="user">The username for the database</param>
 /// <param name="pass">The password for the database</param>
 /// <param name="server">The database server</param>
 /// <param name="port">The port for the connection</param>
 /// <param name="database">The name of the database</param>
 public MySqlWrapper(string user, string pass, string server, int port, string database)
 {
     _connectionString = new MySqlConnectionString(user, pass, server, port, database);
     _connection       = new MySqlConnection(_connectionString.ToString());
     _connection.Open();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor, establishes the Database Connection using a provided connection string
 /// </summary>
 /// <param name="connectionString">The connection string</param>
 public MySqlWrapper(string connectionString)
 {
     _connectionString = new MySqlConnectionString(connectionString);
     _connection       = new MySqlConnection(_connectionString.ToString());
     _connection.Open();
 }
 public EditConnectionString(string constr)
 {
     InitializeComponent();
     _conStr = new MySqlConnectionString(constr);
 }
 private void b_ok_Click(object sender, EventArgs e)
 {
     _conStr = CreateConnectionString();
     this.DialogResult = DialogResult.OK;
 }
 public EditConnectionString()
 {
     InitializeComponent();
     _conStr = null;
 }