Deleting Import Error Tables

  • Thread starter Thread starter Cathy
  • Start date Start date
C

Cathy

Is there a way to delete a series of import error tables programatically? I
am pulling in unformatted data from Excel, which causes many import error
tables... The data is good, just not formatted to directly load into a table.
I would like to regularly programatically delete these import error tables,
otherwise they just continue to accumulate.

Thank you,
 
I can't remember the naming convention for the import error tables. What do
they look like?
 
I'm not sure how (or if it's possible) to capture the strange names that MS
gives these, but if you use a decent naming convention, you may be able to
'reverse program' the procedure...

Assuming "tbl" prefix for reg tables, "jtbl" for junctions, "ttmp" for temp
tables, and "ltbl" for Local tables, something like this piece of complete
aircode may get you started...

Dim td As TableDef, strTable As String
For Each td In TableDefs
strTable = td.Name
If (Left(strTable, 3) <> "tbl") AND _
(Left(strTable, 4) <> "jtbl") AND _
(Left(strTable, 4) <> "MSys") AND _
(Left(strTable, 4) <> "USys") AND _
(Left(strTable, 4) <> "ttmp") AND _
(Left(strTable, 4) <> "ltbl") Then
td.Delete (?)
End If
Next



CAREFULLY!!!! :-)


hth


--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Come to think of it, isn't the prefix for these tables "rad"? Pure guess
here, but it would be much easier (and safer, IMO), to take this approach.

Although, my previous post serves as a prime example for the many many good
things to come about from a complete implementation of a naming scheme!

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Back
Top