Tuesday, September 22, 2009

Q) My LoginPage needs validate the UserId & Password with the Stored data in Excel sheet?

C#:  I’m developing a Login Page for my application. Here I am using Excel sheet for the storing the user credentials.

Q1) Here, what I have to do is, when an user gives his credentials and clicks Login button,
i) Load the “USERIDS” Excel sheet into the DataTable’s Object.
ii) Now check the User Id which is given the “tbuserid” textbox with “USER_ID” column of the “USERIDS” table.
iii) If the User Id is matched, then check with the corresponding matched record’s “PASSWORD” field, [i.e., not entire PASSWORD field needs to check]

[Note: If the User Id is not matched, then no need to check the password field. And sheow the alert message with the “ErrorProvider” control]

iv) If the User Id & Password both are matched, then close this login form & open the “Form1” Form.




Q2) The Password field Textbox should be visible with the ‘*’ character.

Problem: I have getting error message when i clicking the Login button after the credentials are given.



By the following Connection string statement is used:

con1 = new OleDbConnection("Provider=Microsoft.JET.Oledb.4.0;Data Source=D:\\USERIDS.xls;Extended Properties=Excel 8.0; HDR=Yes;IMEX=1");


http://social.msdn.microsoft.com/Forums/en-US/user/threads?user=My%20Best%20Solutions

No comments:

Post a Comment

Followers