any ideas what I'm doing wrong?
this is the code I'm using:
1 Imports MySql.Data.MySqlClient 2 3 Public Class connectForm 4 5 Dim conn As MySqlConnection 6 7 8 9 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 10 SplashScreen1.ShowDialog() 11 12 End Sub 13 14 Private Sub cancelButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cancelButton1.Click 15 Me.Close() 16 End Sub 17 18 Private Sub connectButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles connectButton.Click 19 conn = New MySqlConnection() 20 conn.ConnectionString = "server=" & serverTextBox.Text & ";" _ 21 & "user id=" & usernameTextBox.Text & ";" _ 22 & "password=" & passwordTextBox.Text & ";" _ 23 & "database=" 24 25 Try 26 conn.Open() 27 MessageBox.Show("Connection Opened Successfully") 28 conn.Close() 29 Catch myerror As MySqlException 30 MessageBox.Show("Error Connecting to Database: " & myerror.Message) 31 Finally 32 conn.Dispose() 33 End Try 34 35 36 37 38 End Sub 39 End Class 40