Infatti speravo che qualcuno mi aiutasse a costruire un batch che accedesse al db e gli facesse fare un append!
Ho comunque risolto da codice, faccio un controllo per vedere se i dati sono già presenti nella tabelle di destinazione (dove devo accodare i dati, ovvero quelle con _R alla fine del nome!), se non lo sono li accodo :
codice:
dsAggiornaRettifica_dom = conn.EseguiQuery("select * from BT_domestici_R a where (a.mese_rif = '" & Me.lblCorr.Text & "') and (a.anno_rif = '" & Me.lblAnnoCorr.Text & "' ) ")
dsAggiornaRettifica_div = conn.EseguiQuery("select * from BT_diversi_R a where (a.mese_rif = '" & Me.lblCorr.Text & "') and (a.anno_rif = '" & Me.lblAnnoCorr.Text & "' ) ")
dsAggiornaRettifica_ill = conn.EseguiQuery("select * from BT_illuminazione_R a where (a.mese_rif = '" & Me.lblCorr.Text & "') and (a.anno_rif = '" & Me.lblAnnoCorr.Text & "' ) ")
If ((dsAggiornaRettifica_dom Is Nothing) Or (dsAggiornaRettifica_dom.Tables(0).Rows.Count = 0)) And ((dsAggiornaRettifica_div Is Nothing) Or (dsAggiornaRettifica_div.Tables(0).Rows.Count = 0)) And ((dsAggiornaRettifica_ill Is Nothing) Or (dsAggiornaRettifica_ill.Tables(0).Rows.Count = 0)) Then
'faccio l'append
conn.EseguiQuery("delete from BT_domestici_R where ( mese_rif = '" + Me.lblCorr.Text + "' and anno_rif = '" + Me.lblAnnoCorr.Text + "' ) ")
conn.EseguiQuery("insert into BT_domestici_R select * from BT_domestici where ( mese_rif = '" + Me.lblCorr.Text + "' and anno_rif = '" + Me.lblAnnoCorr.Text + "' ) ")
conn.EseguiQuery("delete from BT_diversi_R where ( mese_rif = '" + Me.lblCorr.Text + "' and anno_rif = '" + Me.lblAnnoCorr.Text + "' ) ")
conn.EseguiQuery("insert into BT_diversi_R select * from BT_diversi where ( mese_rif = '" + Me.lblCorr.Text + "' and anno_rif = '" + Me.lblAnnoCorr.Text + "' ) ")
conn.EseguiQuery("delete from BT_illuminazione_R where ( mese_rif = '" + Me.lblCorr.Text + "' and anno_rif = '" + Me.lblAnnoCorr.Text + "' ) ")
conn.EseguiQuery("insert into BT_illuminazione_R select * from BT_illuminazione where ( mese_rif = '" + Me.lblCorr.Text + "' and anno_rif = '" + Me.lblAnnoCorr.Text + "' ) ")
End If
Grazie 1000 lo stesso