protected void insertFromTrend(String sqlIns, Trend t, int nParms) { OleDbCommand cmd = new OleDbCommand(sqlIns); cmd.Connection = cn; cmd.Parameters.AddWithValue("Moneda", t.Moneda); cmd.Parameters.AddWithValue("Fecha", t.Fecha); for (int idx = 0; idx < nParms; idx++) { cmd.Parameters.AddWithValue("P" + idx, t.getValue(idx)); } cmd.ExecuteNonQuery(); cmd.Parameters.Clear(); }