Validate Mysql Username and Password

  1. 4 months ago


    Sep 15 User since 2016

    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";
    if (awsDB.isError){
    	lblError.text = "Invalid username or password";
    lblError.hidden = false;
    Console.write(awsDB.errorCode + " --" + awsDB.errorMessage);

    Any suggestions??

  2. marco

    Sep 16 Administrator User since 2016

    Hi @TheMexican what about using the isConnected property?

or Sign Up to reply!