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

What is the difference between DataReader and DataSet in ADO.NET?

596


How to create data relations?

558


Explain why canot we use multiple inheritance and garbage collector paralelly in .net?

603


What is sqldatareader in ado.net?

507


What is execute scalar in ado.net?

504






What is the procedure to call a Stored Procedure of Back End in ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

565


Explain how to pass multiple tables in datasets simultaneously?

501


What is the hierarchy of data in databases?

507


What providers does Ado.net uses?

581


What is ado or jdbc?

521


What are the namespaces used in ADO.Net to connect to a database?

605


What is the difference between sqlcommand and sqldataadapter?

510


Which architecture does Datasets follow?

592


What is the difference between executequery and executenonquery?

514


How to identify the updated rows in a dataset?

528