Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have login label and password control and department label for that i want login code using dataset.
table name is login_tbl(login column, password column)
Posted

1 solution

Please read the Site Guidance about asking a question, we do not provide code here when it is just doing someone else's work. In principle:

DO NOT store the plain text password, it is a huge security risk, and if the query is sent to a remote server the values can be intercepted on the network. Instead store a "salted hash" (google for this term) of the password and store the salt om the login table.

Use an SqlCommand (google for this, there are plenty of examples) to get the password and salt for the user ID, then check they match. There are other ways of getting the data out the database such as LINQ to SQL or the Entity Frameworkm, the principle remains the same and you should choose the technology most suitable for your purposes.
 
Share this answer
 
Comments
jayanthik 6-Jul-11 5:27am    
ok i will try in google

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900