string IDs = “2055,1644,5889”;
List<string>
IDNumbers = IDs.Split(‘,’).ToList<string>();
IDNumbers = IDs.Split(‘,’).ToList<string>();
StringBuilder sb = new
StringBuilder();
StringBuilder();
cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
sb.Append(“SELECT
* FROM TABLE WHERE (“);
* FROM TABLE WHERE (“);
//build parameters
foreach (string idNumber in IDNumbers)
{
sb.Append(“TABLE.ID
= “ + “:parm” +
idNumber.ToString());
= “ + “:parm” +
idNumber.ToString());
sb.Append(” OR
“);
“);
}
sb.Remove(sb.Length – 3, 3);
sb.Append(“)
“);
“);
foreach (string idNumber in IDNumbers)
{
cmd.Parameters.Add(new
OracleParameter(“parm” +
idNumber.ToString(), idNumber));
OracleParameter(“parm” +
idNumber.ToString(), idNumber));
}
cmd.ExecuteNonQuery();