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 / boopathiraj
sqlconnection con = new sqlconnection("");
sqlcommand cmd = new sqlcommand("select * from
table-name",con);
//write this code in the button click event
con.open();
dr = cmd.executereader();
while(dr.read())
{
if(textbox1.text==dr.getvalue(0).tostring()&&
textbox2.text==dr.getvalue(1).tostring())
{
msgbox.show("successful");
}
}
con.close();
else
{
msgbox.show("not success");
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Explain the difference in an abstract class and an interface?
What is two way data binding android?
What is sql command in ado net?
The answers which posted above is not satisfied my requirement? Can some one post teh exact answer? Thanx
What is dbcontext and dbset in entity framework?
What is the difference between connected and disconnected environment?
What are the difference between readonly vs. Const?
What are the major challenges in accessing data from a database?
What is basic use of data view?
What is execute reader in ado.net?
What is shadow copy?
How to create data relations?
What do you mean by ‘batch updates’?
What providers does Ado.net uses?
Explain ado.net features?