R
resonance
Hello,
I want to create a simple login form that includes two textboxes and a
button, compare the values in textboxes with the values that are in access
database. But I get this message: "No value given for one or more required
parameters."
Can anyone help me?
Thank you...
Codes are below:
sql = "SELECT * FROM [user] WHERE ([user].[username]=" +
tbUserName.Text.ToString() + "AND [user].[password]=" +
tbUserName.Text.ToString()+ ");";
conn = new OleDbConnection(AccessDataSource1.ConnectionString);
conn.Open();
komut = new OleDbCommand(sql, conn);
Label2.Text=sql;
veri = komut.ExecuteReader();
if (veri.Read())
{
lblMessage.Text = "ok";
}
else
{
lblMessage.Text = " Invalid username or password!";
}
conn.Close();
I want to create a simple login form that includes two textboxes and a
button, compare the values in textboxes with the values that are in access
database. But I get this message: "No value given for one or more required
parameters."
Can anyone help me?
Thank you...
Codes are below:
sql = "SELECT * FROM [user] WHERE ([user].[username]=" +
tbUserName.Text.ToString() + "AND [user].[password]=" +
tbUserName.Text.ToString()+ ");";
conn = new OleDbConnection(AccessDataSource1.ConnectionString);
conn.Open();
komut = new OleDbCommand(sql, conn);
Label2.Text=sql;
veri = komut.ExecuteReader();
if (veri.Read())
{
lblMessage.Text = "ok";
}
else
{
lblMessage.Text = " Invalid username or password!";
}
conn.Close();