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 ado.net in vb net?
What is the difference between OLEDB Provider and SqlClient?
What are the methods of XML dataset object?
How can we check that some changes have been made to dataset since it was loaded?
What is ado.net objects?
Explain ado.net features?
What is an orm, and why would you use one instead of plain old ado.net?
Which object of ado contains datarow datacolumn collection?
What are the classes in System.Data.Common Namespace?
What are the ado.net objects?
How would you connect to a database by using .NET?
What are the rules to implement connection pooling?
Compare Data Reader & Dataset in ado.net?
How to enable and disable connection pooling?
What is the difference between DataReader and DataSet in ADO.NET?