473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Get a list of available stored procedures

Hi there:

I would like to retrive a collection with the avvaialbe stored
procedures, if there are any,
I m using an ODBC connection,
How can this be achieved?
I know u can do a select of one of the system tables with a sql
server, but what happens if i dont have a sql server?
Cheers
Nov 28 '07 #1
4 2086
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
not one standardized way of getting stored procedures across all data
sources).

Also, the provider really doesn't matter in this case (ODBC is a
provider that can connect to many data sources, as is OLEDB) unless it is
for one product and one product only (SQL Server, for example) and even
then, it might not give you the information you want.

For SQL Server, you can simply run the sp_stored_procedures stored
procedure and it will return a list of stored procedures to you:

http://msdn2.microsoft.com/en-us/library/ms190504.aspx
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"roundcrisis" <ro*********@gmail.comwrote in message
news:e0**********************************@d4g2000p rg.googlegroups.com...
Hi there:

I would like to retrive a collection with the avvaialbe stored
procedures, if there are any,
I m using an ODBC connection,
How can this be achieved?
I know u can do a select of one of the system tables with a sql
server, but what happens if i dont have a sql server?
Cheers

Nov 28 '07 #2
On Nov 28, 8:11 am, roundcrisis <roundcri...@gmail.comwrote:
Hi there:

I would like to retrive a collection with the avvaialbe stored
procedures, if there are any,
I m using an ODBC connection,
How can this be achieved?
I know u can do a select of one of the system tables with a sql
server, but what happens if i dont have a sql server?
Cheers
As far as I am aware, there is no standard ODBC method of obtaining a
list of stored procedures on the server you are connected to. Some SQL
providers do not even support stored procedures, from what I
understand. So it depends on the actual provider itself on how to
obtain the list of SPs. For MS SQL Server it is:

select * from information_schema.routines
Nov 28 '07 #3
Hi,

What DB r u using?

In SQL server it's kept in a system table (sysobjects IIRC).

Why are u using a ODBC connection though?

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"roundcrisis" <ro*********@gmail.comwrote in message
news:e0**********************************@d4g2000p rg.googlegroups.com...
Hi there:

I would like to retrive a collection with the avvaialbe stored
procedures, if there are any,
I m using an ODBC connection,
How can this be achieved?
I know u can do a select of one of the system tables with a sql
server, but what happens if i dont have a sql server?
Cheers

Nov 28 '07 #4

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:OX**************@TK2MSFTNGP03.phx.gbl...
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 not one standardized way of getting stored procedures across all
data sources).

Also, the provider really doesn't matter in this case (ODBC is a
provider that can connect to many data sources, as is OLEDB) unless it is
for one product and one product only (SQL Server, for example) and even
then, it might not give you the information you want.

For SQL Server, you can simply run the sp_stored_procedures stored
procedure and it will return a list of stored procedures to you:

http://msdn2.microsoft.com/en-us/library/ms190504.aspx
Just require users with other DB engines to write sp_stored_procedures in
their database -- it's like implementing a common interface.

Then be prepared for sp_stored_procedures to show up in the list on some
databases, and filter it out before showing the user...
Nov 28 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: serge | last post by:
How can i delete all user stored procedures and all table triggers very fast in a single database? Thank you
11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
5
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored...
5
by: Rob Wire | last post by:
For the code below, how could I add an item in the drop down lists for both company and location to be an "All" selection that would send to the stored proc. spRptAttachments a value of "%" so...
45
by: John | last post by:
Hi When developing vb.bet winform apps bound to sql server datasource, is it preferable to use SELECTs or stored procedure to read and write data from/to SQL Server? Why? Thanks Regards
1
by: Cuculain | last post by:
Anyone had problems with this? The Management Studio just saves my attempts to create stored procedures as query files and doesn't add them to the list of stored procedures.
1
by: jobs | last post by:
I have a growning list of stored procedures that accept a single string as a parameter. The list and parameters are maintained in a table with two columns. Some of the Stored procedures take...
0
by: tz71 | last post by:
Is there a way to find out the list of stored procedures that have been congifured to execute automatically when SQLServer restarts? Thanks Tom http://kbupdate.info/
9
by: jyothi1105 | last post by:
Hi all, Here is some information which could help people who want to create stored procedures and execute them in their program. You can create stored procedures in two ways: Through front end...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.