Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ODBC & VB & Stored Procedures

0 views
Skip to first unread message

Vincent Wouters

unread,
May 20, 1996, 3:00:00 AM5/20/96
to

Can someone tell me how to work with Stored Procedures
in a VB4.0/32 environment, working wit Data Access Object.

I'm using a statement like:
BEGIN
proc_name ('inputstring',output);
END;

But Oracle has problems with the 'output' and says that
it has to be declared. I thought the result (output) wil
send in the RecordSet, like a normal Select procedure.

Please mail any suggestions:
v.wo...@fd.agro.nl

Mark Edwards

unread,
May 20, 1996, 3:00:00 AM5/20/96
to Vincent Wouters

Hi Vincent.

Oracle has no way of returning data from a stored
procedure via a result set. The closest it gets
currently is via the PL/SQL table type, but this
cannot be bound to an ODBC datatype.

I am unsure of DAO's capabilities in this area, but
certainly ODBC can handle the calling of a stored
procedure with output parameters. Also, you should
consider using the odbc syntax for calling this
stored procedure:

instead of
Begin proc_name('inputstring',output);
end;

use:

{call proc_name(?,?)}

you should be able, somehow, to bind two parameters
to this sqlstatement, the first being an input
string and the second being an output parameter of
some sort. If not, try using RDO. OpenLink will
soon have RDO cracked, and offer full performance
via odbc so keep an eye on
http://www.openlinksw.com

Mark

Mark Edwards

unread,
May 20, 1996, 3:00:00 AM5/20/96
to Vincent Wouters

Ken North

unread,
May 26, 1996, 3:00:00 AM5/26/96
to

> Mark Edwards <10032...@compuserve.com> writes:
> Vincent Wouters wrote:
> >
> > Can someone tell me how to work with Stored Procedures
> > in a VB4.0/32 environment, working wit Data Access Object.
>
> Mark Edwards wrote:
>
> I am unsure of DAO's capabilities in this area, but
> certainly ODBC can handle the calling of a stored
> procedure with output parameters.
>
>>>>

Mark,

Good point about using ODBC's call escape sequence to execute stored procedures. To use it with DAO it is necessary to use an
SQL Passthrough query (DB_SQLPASSTHROUGH option when creating a dynaset, etc.).

Ken North
author: Windows Multi-DBMS Programming

Resource Group, Inc.
2604B El Camino Real, #351
Carlsbad, CA 92008-1214
FAX: 619-729-5127
e-mail: kenn...@interserv.com or 71301...@compuserve.com

0 new messages