Tables Function:

The Tables Function returns an array of all table names in a database. There is one required argument, connstring which must be a valid OLE database connection string.

Syntax:
array = Tables(connstring)
Example Usage:
<%
dim i, a, cn

cn = 	"Provider=Microsoft.Jet.OLEDB.4.0;" & _
	"Data Source=" & server.mappath("/aspemporium/mydata.mdb") & ";"

a = Tables(cn)

for i = 0 to ubound(a) - 1
	 ' write each table name to the browser
	response.write a(i) & "<BR>"
next
%>
ASP Source Code:
<%
Private Function Tables(byval connstring)
	Dim adox, i, strTables
	Set adox = Server.CreateObject("ADOX.Catalog")
	adox.ActiveConnection = connstring
	for i = 0 to adox.tables.count - 1
		if UCase( adox.tables(i).type ) = "TABLE" then
			strTables = strTables & adox.tables(i).name & vbCrLf
		end if
	next
	Set adox = nothing
	Tables = split( strTables, vbCrLf )
End Function
%>