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
Can we load multiple tables in a dataset?
What is the difference between statement and preparedstatement interface?
Explain the difference between an ado.net dataset and an ado recordset?
How do you update database through dataset?
How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?
How to add a javaScript function in a datagrid?
What is variable view?
What is the role of the dataset object in ado.net?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?
What is microsoft ado?
What are the major challenges in accessing data from a database?
What are the core objects of ADO.NET?
What is the current version of entity framework?
How to aggregating data across related tables?
What are the various methods provided by the DataSet object to generate XML?