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 you mean by filtering of data?
What is data relation?
how can implement dropdownlist in particular of dataset when try to update?
Is ado.net dead?
Which object holds only data and does not interact with data source?
How to pass multiple tables in datasets simultaneously?
What are dataproviders?
What are two types of transaction supported by ado.net?
What are different layers of ADO.Net?
Which object is used to add relationship between two Datatables?
What are advantages of microsoft-provided data provider classes in ado.net?
What is the DataTableCollection?
How to store data in memory?
What is the difference between OLEDB Provider and SqlClient?
Describe briefly an ADO.NET Dataset ?