hi,
try
{
OracleCommand cmd = new OracleCommand();
conn.Open();
using (cmd = conn.CreateCommand())
{
cmd.CommandText = "select count(*) from User_Info where
Password=@p";
cmd.Parameters.Add(new OracleParameter("@u",this.txtUser.Text));
cmd.Parameters.Add(new OracleParameter("@p",this.txtPassword.Text));
int i = Convert.ToInt32(cmd.ExecuteScalar());
if (i > 0)
{
this.Hide();
conn.Close();
}
else
{
conn.Close();
MessageBox.Show("the username or password is error!");
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
conn.Close();
}
Run-time, display the "illegal variable name / number"
thank very much.