Visual C++ and SQL Database using ADO .NET Dataset - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Visual C++ and SQL Database using ADO .NET Dataset

adeyenuwoadeyenuwo Posts: 6Member

I am writing an authentication form. The usernames are loaded directly into a combo box while the password must be entered into the form by the user. As below, I am UNABLE to figure out the right expression that will allow the comparison of whatever is entered into the box and the value that is stored in the MSSQL table which has only 2 columns: Username and Password. I am using VS 2005 and SQL Server 2005. Intellisense gives me options but I am so lost, I am unable to figure out just this part of the code.

I have created a dataset but how do I use my code to reference the Password Column of the dataset so I can make the comparison of what is entered and what is in the database (now loaded into the dataset)? Can someone please help with pointing this out? Thanks.

The Dataset : _EBL_Registered_Users1DataSet
From Table named: _EBL_Registered_Users

if (this->tbxPassword->Text == this->[b] (I am stuck here...)[/b]
MessageBox::Show("Authentication successful", "Welcome",
MessageBoxButtons::OK, MessageBoxIcon::Information);[/color]

private: System::Void BtnLogin_Click(System::Object^ sender, System::EventArgs^ e) {
if (this->tbxPassword->Text == "")
MessageBox::Show("Invalid Password", "Password Error",
MessageBoxButtons::OK, MessageBoxIcon::Error);


Sign In or Register to comment.