I've used the ADOX object to get a table list before...
Something like this will work
<% Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Some connection String"
set objCat = Server.CreateObject("ADOX.Catalog"
objCat.ActiveConnection = objConn
For Each strTable In objCat.Tables
Response.Write strTable.Name & VBCrLf
Next
Set objCat = Nothing
objConn.Close
Set objConn = Nothing %>
Here's a field list of a table....
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "Some connection String"
Set objCatalog = Server.CreateObject("ADOX.Catalog"
objCatalog.ActiveConnection = objConn
dim strProperty
For Each strTable in objCatalog.Tables
If strTable.Name = "a table" Then
If strTable.Columns.Count > 0 Then
For Each strColumn In strTable.Columns
Response.Write strColumn.Name
Next
Else
Response.Write "No fields currently in this table"
End If
End If
Next
Set objRS = nothing
Set objCatalog = nothing
objConn.Close
Set objConn = nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.