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 are the drawbacks of using ado.net?

545


What are the advantages of ado.net?

509


Explain the difference between ado and ado.net?

507


What is ado recordset?

498


What is aggregating data ?

513






I loaded the dataset with a table of 10 records. One of the records is deleted from the backend, how do you check whether all the 10 records were present while updating the data(which event and steps) and throw the exception 28 can datareader hold data from multiple tables?

553


What is ado.net and its architecture?

502


What are the rules to implement connection pooling?

508


What are the advantages and drawbacks of using ado.net?

623


What is openquery?

529


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

533


How is it possible to get 2 tables of data at a time by using data reader?

499


How do you update a dataset in ado.net and how do you update database through dataset?

487


What is DataRowCollection?

625


What is the use of sqldatareader class?

477