VB.NET Login Verification

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2007
Posts: 6
Reputation: SerapH is an unknown quantity at this point 
Solved Threads: 0
SerapH SerapH is offline Offline
Newbie Poster

VB.NET Login Verification

 
0
  #1
Oct 13th, 2007
Hi

I am creating an MDI application that asks the user for a User ID and Password to be able to show personal details once verified. Details of user ids and passwords are available in a MS Access Table1. There is another table2 for user details, and another one yet for transactions made by the user table3.

I have created the connection from access to vb.net through OLEDB.

The only outcome I have managed to produce is a datgrid showing all users, all passwords, and all transactions for each and every user. I.e. >> OleDbDataAdapter1.Fill(dsTable())

I need a procedure that asks the user for his ID and password, then once these are verified, only his appropriate details are shown. Example:

If txtUserID and txtPassword = True then
Show in label 1 Name
SHow in label 2 Surname
etc etc

Can somebody help with code ?
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 122
Reputation: manal is an unknown quantity at this point 
Solved Threads: 17
manal's Avatar
manal manal is offline Offline
Junior Poster

Re: VB.NET Login Verification

 
0
  #2
Oct 13th, 2007
Example:

If txtUserID and txtPassword = True then
while you configure your data adapter , the sql statment will be something like this

Select Name,  Surname from Tablel_name WHERE (id=?)
the question mark means that you will select specific row based on id (primary key)
then in your code you will verify that user entered correct information . after that replace the question mark with value you got from the user

OleDbDataAdapter.SelectCommand.Parameters("ID").Value = TextBox1.Text
        OleDbDataAdapter.Fill(DataSet)


Show in label 1 Name
SHow in label 2 Surname
etc etc
  1. Label1.Text = DataSet.Table_name.Rows(0).Item("Name")
  2. etc etc ..

hope that help you
Last edited by manal; Oct 13th, 2007 at 11:29 pm.
"give only what u willing to receive "
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2058 | Replies: 1
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC