So i got this errorin the word in "in" in the foreach cycle and i surfed the net but i didnt found any answers or understood it, here is the code.
foreach (string items in lstitems.Items)
{
connection.Open();
OleDbCommand comando = new OleDbCommand();
comando.Connection = connection;
string[] caracteresnastring = items.Split(new char[] { ',' }).ToArray();
string codproduto = caracteresnastring[0];
string nome = caracteresnastring[1];
int quantidade = Convert.ToInt32(caracteresnastring[2]);
decimal preco = Convert.ToDecimal(caracteresnastring[3]);
int tamanho = Convert.ToInt32(caracteresnastring[4]);
string total = caracteresnastring[5];
lstitems.Items.Add(txtcodproduto.Text + "," + txtnomeprod.Text + "," + txtquantidade.Text + "," + txtpreco.Text + "," + txttamanho.Text + "," + total);
comando.CommandText = "INSERT INTO detalhes_encomendas_fornecedores (cod_encomenda_forn, cod_produto,quantidade,tamanho, total) VALUES('" + codencomendaforn + "','" + codproduto + "', '" + quantidade + "', '" + tamanho + "', '" + total + "'); ";
comando.ExecuteNonQuery();
connection.Close();
}