Log In then Output the Data of the Logged Person C# SQL 2005

15 pts.
Tags:
C#
Programming
SQL 2005
SQL Database
I have a program that requires a user to input his/her IDNumber. If it doesnt exist the program will prompt to go to the NewRecord section. When the user input his IDNumber and he will be logged on to the real program. After doing the program and pressing the DONE Button. A messagebox will appear that says "Your are now logging off. [FirstName] [LastName]" Here is the example of the table.
 IDNumber        FirstName          LastName 
 1001                   Jane                Smith 
 How can i put the Jane Smith in the messagebox when i log in the idnumber which is 1001 ? thanks


Software/Hardware used:
c#

Answer Wiki

Thanks. We'll let you know when a new response is added.

You would have to query your table to get the corresponding name.

In general you will need a database connection object, a command object and a reader object.

If this is not the answer you were looking for, or you need a more detailed answer, please provide more details about your requirement/problem and let us know what exactly you need help with.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • C1a4h
    I am done with the SQL with the LogIn sir. My problem is how to connect to the other form. And give that output
    15 pointsBadges:
    report
  • NetDeveloper
    how about using properties... in which u can store the values and u can use it through out your program
    90 pointsBadges:
    report
  • NetDeveloper
    or redirect to the next page only once message box "OK" is clicked and this message box is shown in same page where u having this data..
    90 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following