入力フィールドから取得した値を mysql を使用してデータベース内の値と比較しようとすると、エラーが発生します:Oracle.DataAccess.Client.OracleException: 'ORA-00911: invalid character'
OracleCommand cmd2 = new OracleCommand();
cmd2.Connection = conn;
cmd2.CommandText = "SELECT Name FROM Actors WHERE EXISTS (SELECT * FROM Actors WHERE Name = Omar ); ";
cmd2.Parameters.Add("name", textBox7.Text);
cmd2.CommandType = CommandType.Text;
reader = cmd2.ExecuteReader();
while (reader.Read())
{
if(reader[0].Equals(1))
{
while (reader.Read())
{
{
ID_VALUE = Convert.ToInt32(reader["ID"]);
}
}
cmd2.CommandText = $"insert into Movies_Actors values(:ID,{ID_VALUE})";
cmd2.Parameters.Add("ID", textBox1.Text);
cmd2.ExecuteNonQuery();
}
else
{
doesnotExist = true;
}
}