![]() |
SQL Problem in C++ if
Hi there!
I have an EditBox and a database witch i rote in Microsoft SQL Server 2008. I'm trying to check the text in the editbox with the database! I'm doing this because i have form that checks username and password! I've wrote this : Code:
if (Edit1->Text == ADOQuery1->SQL->Text = "Select Username From UsrPassI apresiate any help! |
Re: SQL Problem in C++ if
What error?
Could it be anything to do with the fact that the string hasn't been terminated? |
Re: SQL Problem in C++ if
It points in hear about the error:
Code:
if (Edit1-Text == ADOQuery1->SQL_Text ="Select Username From UsrPass Where Username ='name'") |
Re: SQL Problem in C++ if
The statement doesn't make sense, hence the error. But it's one of those statements where you can't tell what exactly is wrong without knowing what you're trying to do. So there's an if, but what are you comparing with what, and why is there an assignment in the middle of the expression?
|
Re: SQL Problem in C++ if
I'm trying to compare the given username and password in the boxes with these in the database!
|
Re: SQL Problem in C++ if
I would suggest reading the details from the database first, rather than trying to do it in one step.
Code:
ADOQuery1->SQL_Text="select..." |
| All times are GMT +5.5. The time now is 03:32. |