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
Define Execute Scalar?
What are the features of ado.net?
What is the difference between linq and ado.net?
What are the different ado.net namespaces are available in .net?
What is the difference between Data adaptor and Data set?
What is ole db and odbc?
Which keyword is used to accept variable number of parameters?
Explain the architecture of ado.net?
How to work with disconnected data - the dataset and sqldataadapter?
Which control of the BindingNavigator returns the current position within the data source?
Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?
What is the difference between ado.net and entity framework?
What is ado full form?
What are the different row versions available in table?
What is untyped dataset?