Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Procedure which uses DAO to list all the objects i...
Website:
http://www.a1vbcode.com/
Submitted:
1/28/2000
Version:
VB3
Compatibility:
VB3,4,5
Category:
Databases
Views:
11664
Procedure which uses DAO to list all the objects in a Database.
Declarations:
none
Code:
Sub ListTopLevelObjects(strPath As String) ' This procedure lists the top-level objects in a database. ' ' Arguments: ' strPath: The path to the database. Dim dbs As Database Dim tdf As TableDef, qry As QueryDef Dim rel As Relation, ctr As Container Set dbs = OpenDatabase(strPath) Debug.Print "Tables: " For Each tdf In dbs.TableDefs Debug.Print tdf.Name Next tdf Debug.Print "Querys: " For Each qry In dbs.QueryDefs Debug.Print qry.Name Next qry Debug.Print "Relations: " For Each rel In dbs.Relations Debug.Print rel.Name Next rel Debug.Print "Containers: " For Each ctr In dbs.Containers Debug.Print ctr.Name Next ctr dbs.Close Set dbs = Nothing End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement