Uso Visual Stuido Ultimate 2012. Y el MYSQL Connector v4 (el último). Tengo este código. Si necesitáis código anterior pedirlo:
Código
Dim sqlQuery = "SELECT * FROM Pilots Where License = '" + UsernameTextBox.Text + "' AND Password = '" + PasswordTextBox.Text + "' " Dim myCommand As New MySqlCommand() myCommand.Connection = connection myCommand.CommandText = sqlQuery myAdapter.SelectCommand = myCommand Dim myData As MySqlDataReader() myData = myAdapter.ExecuteReader() If myData.HasRows = 0 Then MsgBox("Invalid User/Password!") Else MainForm.Show() Me.Close() End If
Y me da estos errores:
Citar
Error 1 'ExecuteReader' is not a member of 'MySql.Data.MySqlClient.MySqlDataAdapter'. E:\VARS Client\VARS Client\VARS Client\Login.vb 26 18 VARS Client
Error 2 'HasRows' is not a member of 'System.Array'. E:\VARS Client\VARS Client\VARS Client\Login.vb 28 12 VARS Client
Error 2 'HasRows' is not a member of 'System.Array'. E:\VARS Client\VARS Client\VARS Client\Login.vb 28 12 VARS Client
Me podéis ayudar?