MS Access Database Structure
Posted in ASP on May 18th, 2005 Comments Off
This VBScript ASP writes the structure of a MS Access database to the browser. Change the value of dbName accordingly.
<%
dbName=”c:\temp\temp.mdb”
Set DataConnection = _
Server.CreateObject(”ADODB.Connection”)
DataConnection.ConnectionString = _
“Provider=Microsoft.Jet.OLEDB.4.0; _
Data Source=” & dbName & “; _
Jet OLEDB:Database Password=dbpwd;”
DataConnection.Open
Set rs = DataConnection.OpenSchema(20)
While rs.EOF <> True
If Left(rs.Fields(”Table_Name”).Value, 4) <> “MSys” Then
Response.Write rs.Fields(”Table_Name”) & “<br>”
Set DataSet = DataConnection.Execute(”SELECT * FROM _
[" & [...]