i have two textboxes one for user name and another for
password . i have a table name compare(which contains
name,passwod etc.,)my doubt is how compare username
textbox with name column and how compare password textbox
with passwod column. i want the code
Answer Posted / srilekha
{
string s=string.Format("select * from compare where
name='{0}' and Password='{1}'",textbox1.Text,textbox2.Text);
SqlDataAdapter da=new SqlDataAdapter (s,conn);
DataTable dt=new DataTable();
da.Fill(dt);
if(dt.Rows.Count>0)
{
Lable1.text="login successfull";
}
else
{
Lable1.text="login fail";
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What is data relation?
What is the difference between data reader and data adapter?
How to maintain the relation between two tables in ADO.NET?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
What is Data view?
What are two important objects of ADO.Net?
What are two types of transaction supported by ado.net?
How to create data relations?
What is the use of SqlCommandBuilder?
Define Execute Scalar?
describe the dataset object in ado.net.
What do you know about ado.net's objects?
What is typed dataset ?
What is difference between executequery and executeupdate?
How to enable and disable connection pooling?