My two columne email and status on tableemail i had use a data reader for count mail address and send mail:
> OleDbCommand cmd = null;
> OleDbCommand cmd2 = null;
>
> string queryString = "select email,status from tableemail";
> using (OleDbConnection connection = new OleDbConnection("Provider = OraOLEDB.Oracle.1; Data Source = xe;
> Password=eppspps;User ID = xpress; unicode=true"))
> {
> OleDbCommand command= new OleDbCommand(queryString, connection);
> connection.Open();
> cmd = new OleDbCommand(queryString);
> cmd.Connection = connection;
> OleDbDataReader reader = cmd.ExecuteReader();
>
> while (reader.Read())
>
> {
> MailAddress to = new MailAddress(reader[0].ToString());
> message.To.Add(to);
> }
this code is work good, but
i need update status data to tablemail after check null value on data reader
> if (!reader.IsDBNull(1))
> {
> cmd2 = new OleDbCommand(" UPDATE tableemail set status=1 where status is null", connection);
> cmd2.ExecuteNonQuery();
> }