Hi....
You have to write the query to check the password. It will be better if you use StoredProcedure ..
Sample of the stored procedure
CREATE PROCEDURE _checkpass
(
@password varchar(10)
)
As
select password from table where password=@password
if @@rowcount<1
select @status=0
else
select@status=1
Go
Once you write the above stored pro with sql server
user the following code... in your application
myCommand = new SqlCommand("_checkpass", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.Parameters.Add(new SqlParameter("@password", SqlDbType.VarChar, 50));
myCommand.Parameters["@password"].Value =txtpass.Value;
myCommand.Connection.Open();
try
{
myCommand.ExecuteNonQuery();
if((int)status.Value==0)
{
Go Ahead........
}
else
{
Stopped Functioning
}