Hey guys, dont know if this is the right place but I will post here anyway...
I am writing a program and I am having some issues with selecting the MySql data using C#.
Anyone can help me with this? Its a simple login script but I just cant get my head around it and need a fresh pair of eyes
Thanks in advance
.Beatz
My MySql DLL is attached
I am writing a program and I am having some issues with selecting the MySql data using C#.
Quote
private void Checks()
{
string UN = Username_Text.Text;
string Pass = Password_Text.Text;
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
try
{
cmd.Select("users").Where("Username", UN);
MySqlReader r = new MySqlReader(cmd);
while (r.Read()) // Breakpoint added here shows that the program is reading up to this point but does not read anything below this line until the return;
{
string RealPassword = r.ReadString("Password");
string RealUsername = r.ReadString("Username");
if (RealUsername == UN && RealPassword == Pass)
{
MessageBox.Show("YAY!");
}
else
{
MessageBox.Show("DAMN!");
}
}
return;
}
catch (Exception Exc) { MessageBox.Show(Exc.ToString()); }
}
Anyone can help me with this? Its a simple login script but I just cant get my head around it and need a fresh pair of eyes
Thanks in advance
.Beatz
My MySql DLL is attached













(Couldnt upload as a direct .dll so had to re-rar it lol)
