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 provider ado.net use by default? Explain the role of data provider in ado.net?
Give an example that shows how to execute a stored procedure in ado.net?
What is a string variable?
Which is faster dataset or datareader?
Define connection string?
What is ole word?
How to pass values into a datatable?
What is difference in record set and dataset?
Which is faster sqldataadapter and sqldatareader?
Why do we use sqldataadapter?
What is data access pattern?
How does ado.net work?
What is different between sqlcommand object and command behavior object?
What is ado net stands for?
What are the benefits of using of ADO.NET in .NET 4.0?