Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

List all the steps in order, to access a database through ado.net?

1088


What is untyped dataset?

1094


What is ado in agriculture?

966


How to find the given query is optimised one or not?

979


What is a column variable?

941


What is the provider being used to access oracle database?

998


What is the significance of CommandBehavior.CloseConnection ?

1171


What are all the commands used with Data Adapter?

1043


How to create dynamic gridview?

1035


What are the ado.net objects?

944


What is ado rdo dao in visual basic?

1168


What is ado connection?

959


What are the different execute methods of Ado.Net?

1027


How to pass multiple tables in datasets simultaneously?

1061


In how many ways we can retrieve table records count? How to find the count of records in a dataset?

1012