Dim sqlinfo As String = ("Data Source=www.abc.com;Database=abc_db;User ID=abc_user;Password=abcpass;") Dim con As MySqlConnection = New MySqlConnection(sqlinfo) Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Dim con As MySqlConnection = New MySqlConnection(sqlinfo) Try con.Open() 'Bağlantımı açıyorum Label5.Text = "OK" Catch ex As MySqlException Label6.Text = "HATA!" MessageBox.Show(ex.Message, "Hata Kodu : " & ex.Number.ToString, MessageBoxButtons.OK, MessageBoxIcon.Error) Finally con.Close() 'Bağlantımı kapatıyorum End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)