Bei diesem Code:
bekomme ich hier die fehler meldung : Connection must be valid and open
VB.NET-Quellcode
- mysqlconectipn = New MySqlConnection
- mysqlconectipn.ConnectionString = "server=db4free.net;Port=3306; user id=*****; Password=******; database=mapple"
- mysqlconectipn.Open()
- Dim myadapter As New MySqlDataAdapter
- Dim sqlquery = "SELECT * From Users WHERE Username='" & UsernameTextBox.Text & "' AND Password='" & PasswordTextBox.Text & "';"
- Dim command As New MySqlCommand
- command.Connection = New MySqlConnection
- command.CommandText = sqlquery
- myadapter.SelectCommand = command
- Dim data As MySqlDataReader
- data = command.ExecuteReader
- If data.HasRows = 0 Then
- MsgBox("!!!!!")
- Else
- MsgBox("2")
- End If
bekomme ich hier die fehler meldung : Connection must be valid and open