Salve a tutti vorrei cancellare tutte le tabelle che si sono create in un determinato db, premetto che il codice che postero esegue in parte quello che vorrei realmente, nel senso che entra nel database trova qualche tabella e l' elimina, ma il problema è che non esegue l'intero processo lasciandomi tabelle
Dim cnV As New ADODB.Connection
Dim tbV As ADOX.Table
Dim xcV As New ADOX.Catalog
cnV.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\MIODATAB.mdb" '; Persist Security; Info = False; """
xcV.ActiveConnection = cnV
For Each tbV In xcV.Tables
If tbV.Name <> "MSysAccessObjects" And tbV.Name <> "MSysACEs" And tbV.Name <> "MSysObjects" And tbV.Name <> "MSysQueries" And tbV.Name <> "MSysRelationships" Then
xcV.Tables.Delete tbV.Name
End If
Next tbV
cnV.Close
suggerimenti ? grazie in anticipo
Ultima modifica effettuata da Aangelus il 16/06/2014 alle 18:24 |