Tags

,


The following procedure will retrieve all the user-created functions: 
 

CREATE PROCEDURE dbo.listProcedures 
AS 
BEGIN 
    SET NOCOUNT ON 
    SELECT 
        ROUTINE_NAME 
    FROM 
        INFORMATION_SCHEMA.ROUTINES 
    WHERE 
        ROUTINE_TYPE=’FUNCTION’ 
    ORDER BY 
        ROUTINE_NAME 
END 
GO

 
 
So from ASP: 
 

<% 
    set conn = CreateObject(“ADODB.Connection”) 
    conn.open “<connection string>” 
    set rs = conn.execute(“EXEC dbo.listProcedures”) 
    do while not rs.eof 
        response.write rs(0) & “<br>” 
        rs.movenext 
    loop 
    rs.close: set rs = nothing 
    conn.close: set conn = nothing 
%>
Advertisements