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
How to aggregating data across related tables?
What is ado recordset?
What is the difference between connected and disconnected environment?
What is ado.net connection?
Explain the role of data provider in ado.net? What is the role of data provider in ado.net?
Which name space is used to get assembly details?
What are the advantages and drawbacks of using ado.net?
What is the difference in record set and dataset?
How to pass values into a datatable?
What is ole db query?
What is disconnected scenario in entity framework?
Explain all the classes those are used for database connections between sql server and asp.net?
What is the purpose of using adodb?
What is the meaning of object pooling?
What is the DataTableCollection?