Re: Oracle Procedure and ADO
Date: Sat, 03 Feb 2001 17:29:00 +0100
Message-ID: <q8co7tk5qv7m4houb95bbdao45jdr60l3s_at_4ax.com>
IMHO It is impossible to return the Oracle cursor to calling client environment via ADO/ODBC connection as a ADO recordset.
You should return the result values as variables.
Vit.
On Thu, 1 Feb 2001 16:33:10 -0500, "LF" <frolio_at_videoshare.com> wrote:
>You need to wrap your code with a package adn you need to return the record
>set
>with a cursor.
>
>L
>"Phill Atkinson" <Phill_at_tibble.net> wrote in message
>news:FCcd6.57497$pp2.3961518_at_news3.cableinet.net...
>> Can anyone help?
>>
>> I'm trying to return a recordset to ADO from an Oracle procedure.
>>
>> In MS SQL the following would work ok:
>>
>> create procedure spSelStaff
>> _at_nStaffID Int =null
>> as
>>
>> begin
>>
>> if _at_nStaffID is null
>> begin
>> select s.StaffID,
>> s.TitleID,
>> t.Title,
>> s.FirstName,
>> s.LastName
>> from Staff s
>> inner join Title t
>> on s.TitleID = t.TitleID
>> end
>> else
>> begin
>> select s.StaffID,
>> s.TitleID,
>> t.Title,
>> s.FirstName,
>> s.LastName
>> from Staff s
>> inner join Title t
>> on s.TitleID = t.TitleID
>> where StaffID = _at_nStaffID
>> end
>>
>> end
>>
>>
>> In Oracle this is invalid. Why?
>>
>> create or replace procedure scott.test is
>> begin
>>
>> select *
>> from emp;
>>
>> end;
>>
>>
>>
>
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =----- Received on Sat Feb 03 2001 - 17:29:00 CET