public static void InsertMysqlInsuredCoverage() { ConectarEpslog(); string query = "select * from seguros_coberturas where flag = '0' and cautocode <> '0000' order by cautocode"; OleDbCommand commandselect = new OleDbCommand(query, Conex); OleDbDataReader reader = commandselect.ExecuteReader(); ConnectionMySQL.Connect(); while (reader.Read()) { ConnectionMySQL.InsertCoverageInsured(reader.GetValue(2).ToString(), reader.GetValue(4).ToString(), reader.GetValue(5).ToString(), reader.GetValue(9).ToString(), reader.GetValue(10).ToString(), ""); UpdateAfterInsert("seguros_coberturas", "cautocode", 2, reader); } Desconectar(); ConnectionMySQL.Disconnect(); }