hello the code down here works perfectly to connect to a mysql server.
but now i want it to read from it.
so it can look that , lets say textbox2.text and textbox3.text are the same as in the database he will get acces to my program.
and if its not the same then he wont get acces.
Well i hope someone can help me , if u want me to be more specific just say it.
(I am using vb 2008)
Imports MySql.Data.MySqlClient
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim localMySqlConnection As MySqlConnection = New MySqlConnection("server=*********;database=dbforprog;uid=******;password=*****;")
Try
localMySqlConnection.Open()
If localMySqlConnection.State = ConnectionState.Open Then
MessageBox.Show("Verbinding tot stand gebracht", "Let op!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
End If
Catch err As MySqlException
MessageBox.Show(err.Message, "Error")
localMySqlConnection.Close()
End Try
End Sub
End Class