Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Returning recordsets from stored procs with ADO

Re: Returning recordsets from stored procs with ADO

From: <balmerd_at_my-dejanews.com>
Date: Mon, 05 Apr 1999 21:04:26 GMT
Message-ID: <7eb8gl$dbg$1@nnrp1.dejanews.com>


Hi Paul,

There is an excellent book titled "ADO/RDS Programming using ASP" that contains an entire chapter on using Oracle stored procedures and packages. It also has a table which describes which DLLs and versions are required.

http://www.wrox.com/Store/Details.asp?Code=1649

Hope this helps...

David Balmer
Consultant
Relational Solutions Inc.

In article <7e3l8p$bdo$1_at_nnrp1.dejanews.com>,   paulsherman_at_my-dejanews.com wrote:
> This is my package:
>
> Package VBTEST
>
> IS
> TYPE ret_type is TABLE of VARCHAR2(25)
> INDEX BY BINARY_INTEGER;
>
> PROCEDURE RetArray
> (RetValArray OUT ret_type);
>
> END; -- Package specThis is package body:
>
> ================================
> Package Body VBTEST
> is
> PROCEDURE RetArray
> (RetValArray OUT ret_type)
> is
> CURSOR arr_cursor is
> select last_name
> from s_emp;
> arr_count NUMBER default 1;
> BEGIN
> for item in arr_cursor
> loop
> RetValArray(arr_count) := item.last_name;
> arr_count := arr_count + 1;
> end loop;
> end;
> END;
> =======================================
> And here I call that procedure from Visual Basic:
>
> SQL = "{call VBTEST.RETARRAY({resultset 100,RetValArray} )}"
>
> Set Qry.ActiveConnection = cnADO
> Qry.CommandText = SQL
> Qry.CommandType = adCmdText
>
> Param.Type = adLongVarBinary
> Param.Size = 100
> Param.Direction = adParamOutput
>
> Qry.Parameters.Append Param
>
> rs.CursorType = adOpenStatic
> rs.CursorLocation = adUseClient
> rs.LockType = adLockReadOnly
>
> Set rs.Source = Qry
> rs.Open
>
> Do While Not rs.EOF
> Combo1.AddItem rs(0)
> rs.MoveNext
> Loop
>
> It works OK with Latest Microsoft Oracle ODBC driver, but with
> latest Oracle ODBC driver (2.05.0301) gives an "Syntax error" message.
>
> I would use the MICROSOFT driver, but some other stuff doesn't work
> with it.
>
> Do you have any idea, what the difference is?
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Apr 05 1999 - 16:04:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US