[DB-SIG] How to return results from stored procedures in Oracle

Marcos Sánchez Provencio msanchez@grupoburke.com
31 Aug 2002 12:40:22 +0200


Hello there.

In TSQL (the procedural language used in Sybase and MSSQL) it is very
simple to return rows from a procedure and use it as a query issued by
the user dinamically. I have managed to do get the same effect in ADO/VB
using a rather contrived mechanism which involved putting the procedure
in a package and returning some type (cursor, I think).

How can I get it using DBAPI in Oracle? How about PostgreSQL?

What I want is something like

--TSQL code--

create procedure onlyone @id int
as
select * from mytable where id=@id

--END TSQL code--

So, for example, I can give permissions to access the data one by one,
knowing the id in advance.