I have a window with a username and password TextFields. The Window also has a MysqlDatabase Object with the properties username and password empty.
What I want is to validate the username and password used to connect to the database.
I noticed the MySQLdatabase Object has a connect() method but it doesn't return anything. How can I validate username and password. This is the code I have on the Button Action to login:
wsDB.username = txtUsername.text; awsDB.password = txtPassword.text; awsDB.database = "shift"; awsDB.connect(); if (awsDB.isError){ lblError.text = "Invalid username or password"; lblError.hidden = false; Console.write(awsDB.errorCode + " --" + awsDB.errorMessage); } else{ awsDB.close(); Patients.open(); }
Any suggestions??