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 acid in ado.net?
What is sqldatareader in ado.net?
Explain advantages of ado.net?
What is the difference between an ADO.NET Dataset and an ADO Recordset?
What do you know about ado.net's methods?
What two types of data providers does ADO.NET supply? What determines which one you should use?
How can we load multiple tables in a dataset?
Why ca not we use multiple inheritance and garbage collector paralelly in .net?
What are the essential features of ado.net?
What Is Difference Between Ado And Ado.net?
What is maximum pool size in ado.net connection string?
How does entity framework work?
What are the advantages using ado.net?
How do you update a dataset in ado.net?
Does executenonquery return a value?