Finding a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does any one know of a tool that will let me find witch MDB use a table
"REMITS"?

I have a list have about 60 .MDB programs. I need to find witch one's use
the "REMITS" table. Beside opeing each one and look in "Tables", I am
looking for a faster way.

Scott Burke
 
Does any one know of a tool that will let me find witch MDB use a table
"REMITS"?



public function GotIt( _
path as string, _
tableName as string _
) as boolean


' assume it's not there
GotIt = false

dim db as database
' open the database non exclusive, readonly
set db = opendatabase(path, false, true)

' see if it's there
dim tdf as tabledef
for each tdf in db.TableDefs
if UCase(tdf.Name) = UCase(tableName) Then
' wow - we've got it
GotIt = True
Exit For
End If
Next tdf

' tidy up
db.close

end function


public sub LookForTable( _
tableName As String, _
filePattern as String)

dim fn as String
fn = dir(filePattern)
Do while len(fn)>0
if GotIt(fn, tableName) then
debug.print fn
end if
fn = Dir()
Loop

end sub

' test it out
LookForTable "REMITS", "g:\myData\Backends\*.mdb"


Hope that helps


Tim F
 
Back
Top