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 / vijay

sqldatasource s=new sqldatasource();
s.connectionstring=configurationmanager.connectionstring
["compareconnectionstring"].connectionstring;
s.selectcommand="select count(*) from compare where uid='"
+ textbox1.text + "'and pwd='" + textbox2.text + "'";
Dataview dv=new dataview();
dv=(dataview)s.select(datasourceselectarguments.empty)
if(dv[0][0]>0){} //found
else{}//not found

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you update database through dataset?

735


How can we load multiple tables in a dataset?

781


What is bubbled event can you please explain?

738


What is the full form of ado?

686


Do you use stored procedure in ado.net?

773


What Is Difference Between Ado And Ado.net?

768


What is the default timeout specified for "sqlcommand.commandtimeout" property?

756


What do you mean by performing asynchronous operation using command object?

751


How to Read, Add, Update and Delete record in Entity Framework ?

783


What do you mean by ‘batch updates’?

758


What is ole in vb?

683


Which is better ole db or odbc?

683


What are the pre-requisites for connection pooling?

737


Which method in OLEDBAdapter is used to populate dataset with records?

772


What are the data access namespaces in .NET?

890