Re: how to get functions from stored procedures

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: nVarchar limitations using OLEDB provider
    ... not nvarcharor greater using a clientside cursor. ... SqlCeResultSet instead of the OleDb provider. ... The issue may actually lie on the client code and not on the ...
    (microsoft.public.sqlserver.ce)
  • Re: nVarchar limitations using OLEDB provider
    ... On a device I won't be using the OLEDB provider. ... On the desktop it sure is a limitation, ... issue may actually lie on the client code and not on the provider. ...
    (microsoft.public.sqlserver.ce)
  • RE: Problems with ACE OLEDB provider
    ... Excel sheets created as linked servers from SQL Server via the ACE ... OLEDB provider version 12 fail on table updates. ... I have this worksheet defined as a linked server in SQL Server via this ...
    (microsoft.public.excel.programming)
  • Re: Get a list of available stored procedures
    ... Well, if you don't have a SQL Server, then you will have to use whatever ... DB-specific method will give you a list of the stored procedures (there is ... provider that can connect to many data sources, as is OLEDB) unless it is ... I m using an ODBC connection, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Adding a data source to a project
    ... the list of OleDB provider in the Ado Select/Change Connection wizard ... @="Microsoft SQL Server 2005 Compact Edition OLE DB Provider for Windows ...
    (microsoft.public.sqlserver.ce)