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!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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

[code]
[color=#CC0000]
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);


}

[/code]
Sign In or Register to comment.