//  home   //  advanced search   //  news   //  categories   //  sql build chart   //  downloads   //  statistics
 ASP FAQ 
Home
ASP FAQ Tutorials

   8000XXXX Errors
   ASP.NET 2.0
   Classic ASP 1.0
   Databases
      Access DB & ADO
      General SQL Server & Access Articles
      MySQL
      Other Articles
      Schema Tutorials
      Sql Server 2000
      Sql Server 2005
   General Concepts
   Search Engine Optimization (SEO)

Contact Us
Site Map

Search

Web
aspfaq.com
tutorials.aspfaq.com
databases.aspfaq.com

ASP FAQ Tutorials :: Databases :: Schema Tutorials :: Schema: How do I show the user-defined functions (UDFs) in a database?


Schema: How do I show the user-defined functions (UDFs) in a database?

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 
%>

Related Articles

Schema: How do I list all the indexes in a database?
Schema: How do I list the databases on my server?
Schema: How do I show all the primary keys in a database?
Schema: How do I show all the triggers in a database?
Schema: How do I show the columns for a table?
Schema: How do I show the description property of a column?
Schema: How do I show the parameters for a function or stored procedure?
Schema: How do I show the stored procedures in a database?
Schema: How do I show the tables in a database?
Schema: How do I show the views in a SQL Server database?

 

 


Created: 12/14/2003 | Last Updated: 12/14/2003 | broken links | helpful | not helpful | statistics
© Copyright 2006, UBR, Inc. All Rights Reserved. (216)

 

Copyright 1999-2006, All rights reserved.
Finding content
Finding content.  An error has occured...