Tuesday, 26 June 2012

Ex15: VBA - List the parameter/action queries using ADOX

Function ShowProx()
    'Purpose:   List the parameter/action queries using ADOX.
    Dim cat As New ADOX.Catalog
    Dim proc As ADOX.Procedure
    Dim vw As ADOX.View
    cat.ActiveConnection = CurrentProject.Connection
    Debug.Print "Procedures: " & cat.Procedures.Count
    For Each proc In cat.Procedures
        Debug.Print proc.Name
    Debug.Print cat.Procedures.Count & " procedure(s)"
    Debug.Print "Views " & cat.Views.Count
    For Each vw In cat.Views
        Debug.Print vw.Name
    Set cat = Nothing
End Function

No comments:

Post a Comment