Re: ODBC and stored procedures
From: Bill Meahan <wmeahan_at_sun1.fsic.ford.com>
Date: 1995/07/06
Message-ID: <3th8us$ask_at_eccdb1.pms.ford.com>#1/1
No can do, Andy! "execute" is a SQL*Plus command, not legal SQL or PL/SQL. All "execute" does in SQL*Plus is to wrap the "begin" and "end;" around the procedure invocation then execute the resultant anonymous PL/SQL block. All you can pass via ODBC is legal SQL or an anonymous PL/SQL block.
Date: 1995/07/06
Message-ID: <3th8us$ask_at_eccdb1.pms.ford.com>#1/1
mcallister_at_grad.missouri.edu (Andrew McAllister) wrote:
>You must create a pass through query in your ODBC enabled application (I'm
>assuming VB or Access). Your application documentation should give examples
>for creating a pass through query.
>
I don't think you *need* to do this, as long as you're careful about the syntax. Since you're not going to get any records back anyway, it doesn't hurt and may help performance.
>Once you have the pass through created, set the sql string property in one of
>the following ways:
>1) begin execute my_procedure(arg1, arg2) end;
^^^^^^^
No can do, Andy! "execute" is a SQL*Plus command, not legal SQL or PL/SQL. All "execute" does in SQL*Plus is to wrap the "begin" and "end;" around the procedure invocation then execute the resultant anonymous PL/SQL block. All you can pass via ODBC is legal SQL or an anonymous PL/SQL block.
>or
>2) {call my_procedure(arg1, arg2)}
>
Still not legal SQL (with Oracle anyway). This may work with Sybase or SQL/Server, but not Oracle.
-- Bill Meahan wmeahan_at_sun1.fsic.ford.com Ford Motor Company -- End User Support - North America Not an official statement of Ford Motor Company or anyone else except the author (though my dog tends to agree with all I say)Received on Thu Jul 06 1995 - 00:00:00 CEST