Question:
programmers please help me...?
houseno003
2008-02-01 23:47:38 UTC
my teacher give me c# project.the project is
1.have a form that have username and password with their coresponding textboxs.
2.there is SQL SERVER 2005 database table called login that contain username and password columns.
Q:cross check textbox values with database table column values to filter the right users.
I think this can be done using datatables.but i want u to help me even by giving me books to read.thanks lot.
Four answers:
newlb4u
2008-02-02 01:38:35 UTC
You should approach the problem as four stages.



1 gather information from the user



2 Build Your sql query and query the database



3 return true or false depending on whether the credentials of the user are ok



4 Set authorised flag for later. If this is an ASP project then you will need to create an uthorisation cookie.



So you have your four parts and you should approach the problem systematically.



Remember all you need to do is prove that the data entered is the same as that stored on the database.



I think yuo should look at MSDN.com which is microsofts website and you should look up The following

Datasets

SQLClient Connection

SQLClient Commands..



This should be more than enough to enhance your knowledge and finish your project.

Best

NLB
2008-02-02 11:30:45 UTC
That's lot of work, may be you can contact a C# expert live at website like http://askexpert.info/
Raj
2008-02-02 08:10:34 UTC
Just study C#.Net from a local author book you can understand the basics of evey thing.

Use net properly.



www.w3schools.com

go to .NET in that



www.pdfchm.com <------------------



you can download any books free of cost dear!!(use the second link inscribed with arrow mark)
Anne Margarette
2008-02-02 08:18:00 UTC
SqlDataAdapter da_comp = new SqlDataAdapter("SELECT * FROM tablename WHERE username = '" + txtusername.text + "' AND password = '" + txtpassword.text + "'", cnconnection);

DataSet ds_comp = new DataSet();

da_comp.Fill(ds_comp, "tablename");

DataTable dt_comp = ds_comp.Tables["tablename"];



if(ds_comp.Rows.Count.Equals(0))

{

Messagebox.show("Username and password does not exist");

}







Try this one....


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...