• Home
  • About
  • Downloadables
  • Weightloss for Recessive Times

Kibo …

… keeping meat fresh since 1970

Feed on
Posts
Comments

MS Access Database Structure

May 18th, 2005 by Intermanaut

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 _

[" & rs.Fields("Table_Name") & "]“)

For x = 0 To DataSet.Fields.Count – 1

Response.Write ” – ” & DataSet.Fields(x).Name & “<br>”

Next

End If

rs.MoveNext

Wend

rs.Close

%>

Posted in ASP | No Comments

Comments are closed.

  • Recent Posts

    • Motorola MotoActv Review
    • Exceptionally Poor Grammar
    • The Adjustment Bureau
    • Unkown
    • Paul
  • Things

    • About
    • Addresses worth banning from your forum
    • Downloadables
    • Foamcore Macro Studio
    • Multiplicity: Pouring yourself a beer
    • Multiplicity: The five of me
    • Ross on Wye: What a Mess
    • Weightloss for Recessive Times
  • Stuff

    • Conversations (22)
    • Movies (21)
    • Programming (12)
      • ASP (3)
      • JavaScript (6)
      • PHP (2)
      • VBA (1)
    • Rambles (265)
      • Angry (48)
      • Happy (21)
    • Blogroll

      • 1 city, 2 people, 24 hours
      • del.icio.us
      • EmmieJay – guilt-free style
      • flickr

Kibo … © 2012 All Rights Reserved.

MistyLook made free by Web Hosting Bluebook