Other Software > Developer's Corner
A bit of help C# and MySql
.Beatz:
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#.
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()); }
}
--- End quote ---
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
wraith808:
Where is your MySQL Dll from? Is it yours, or did you get it from somewhere? If you got it from somewhere, I'd suggest placing a link to where. If it's yours, I'd suggest posting source instead.
Why?
Well, not to be a cynic, but you have one post. I'm not going to download anything I'm not totally sure of from someone with one post. Sorry, but that's a sign of the internet times.
.Beatz:
downloaded from Elitepvpers.de... It come in a source that I was working on and can't find the source code for it or the download link...
I know I only have one post but I can assure you that the DLL is what I say it is... a dll nothing else nothing more.
I will keep looking for the download I got it from and will post it if I can find it...
KynloStephen66515:
I will back Beatz up on this as I do know him.
I _tried_ to help on this subject but I kinda failed lol
*edit*
Downloaded the rar file and uploaded it to my post, its legit :) (Couldnt upload as a direct .dll so had to re-rar it lol)
If you wanna download it DIRECTLY as ONLY a .dll, then use this link:
http://86.28.143.246/MySqlHandler.dll (MY Web Server)
Stoic Joker:
What errors are you getting, and what is the structure of the table you're querying?
Navigation
[0] Message Index
[#] Next page
Go to full version