Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void LoginKnop_Click(object sender, System.EventArgs e)
- {
- MySqlConnection con = new MySqlConnection("datasource=127.0.0.1;port=3306;username=root;password=JariR0800;database=test;");
- try
- {
- if (con.State == ConnectionState.Closed)
- {
- con.Open();
- loginLog.Text = "Database geconnect";
- }
- }
- catch(MySqlException ex)
- {
- loginLog.Text = ex.ToString();
- }
- finally
- {
- con.Close();
- }
- }
- }
Add Comment
Please, Sign In to add comment