Re: how to get functions from stored procedures
- From: "Steve Hale" <shale@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 16:01:49 -0700
You don't say which OLEDB provider you are using here, but in general you
should be able to do the following:
- If the provider supports restrictions on column PROCEDURE_TYPE, you can
restrict on PROCEDURE_TYPE == 3 (
DB_PT_FUNCTION) or PROCEDURE_TYPE == 2 (DB_PT_PROCEDURE).
- If the provider does not support restrictions on PROCEDURE_TYPE (OLEDB
Provider for SQL Server does not), then you can just obtain unrestricted
DBSCHEMA_PROCEDURES and only return rows where PROCEDURE_TYPE == 3 back to
the consumer.
- Alternatively, if using SQL Server, you can execute: select * from
sysobjects where xtype = 'FN'
OR
select * from sysobjects where xtype = 'P'
This will also give you the functions or procedures.
Steve
"Trainee" <trniac@xxxxxxxxxxxxx> wrote in message
news:%23dCieTqwFHA.2232@xxxxxxxxxxxxxxxxxxxxxxx
> hi
> i am using an oledbprovider for retrieving schema information from a
> database.
>
> for that i am using OleDbSchemaGuid.Procedures to get the list of
> procedures but i get both functions as well as stored procedures from that
> method .
>
> how do i separately get the list of functions and the list of stored
> procedures using OleDbSchemaGuid?????
>
>
.
- Follow-Ups:
- Re: how to get functions from stored procedures
- From: Trainee
- Re: how to get functions from stored procedures
- Prev by Date: Debug symbols for old version of oledb32.dll/MDAC
- Next by Date: Re: How to get and set OleDb Connection access mode?
- Previous by thread: Debug symbols for old version of oledb32.dll/MDAC
- Next by thread: Re: how to get functions from stored procedures
- Index(es):
Relevant Pages
|