Breaking News

Tuesday, June 26, 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
Next
Debug.Print cat.Procedures.Count & " procedure(s)"
Debug.Print

Debug.Print "Views " & cat.Views.Count
For Each vw In cat.Views
Debug.Print vw.Name
Next

Set cat = Nothing
End Function

No comments:

Post a Comment

Designed By Published.. Blogger Templates