Procedures Function:
Returns an array containing the names of all procedures in a database.
Description:
The Procedures Function returns an array containing the names of all procedures in a database. There is one required argument, connstring which must be a valid OLE database connection string.
Syntax:
array = Procedures(connstring)
Example:
<%
dim i, ar, cn
cn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & server.mappath("/database/mydata.mdb") & ";"
ar = Procedures(cn)
for i = 0 to ubound(ar) - 1 '--- write each procedure name to the browser response.write ar(i) & "<BR>" next
%>
ASP Source Code:
<%
Private Function Procedures(byval connstring) Dim adox, i, strProcs Set adox = Server.CreateObject("ADOX.Catalog") adox.ActiveConnection = connstring for i = 0 to adox.procedures.count - 1 strProcs = strProcs & adox.procedures(i).name & vbCrLf next Set adox = nothing Procedures = Split( strProcs, vbCrLf ) End Function '--- Procedures
%>
|