Article View: comp.databases.ms-access
Article #566Re: HOW TO: ADO 2.5 Oracle Stored Proc into Recordset
From: jocave
Date: Thu, 30 Nov 2000 00:00
Date: Thu, 30 Nov 2000 00:00
54 lines
2951 bytes
2951 bytes
In article <SswV5.18786$II2.1855235@newsread2.prod.itd.earthlink.net>,
"Hope Reyes" <hopealso@my-deja.com> wrote:
> Hi and thanks in advance...
>
> Can somone give me syntax, and/or advice, and or references, that
will allow
> me to run an Oracle stored procedure from VB ADO 2.5 that will
provide input
> (criteria parameters) and return a resultant recordset on a DQL select
> statement inside the stored proc? Can one use a simple command
object and
> parameters collection or not? I have a book (Visual Basic Oracle 8,
wrox)
> that says in older ADO this would not work and one needed a pass-
through.
> But we are trying to use OLE DB instead of ODBC.
>
> I am interested in using Oracle stored procedures so that I
may "reuse"
> query syntax and simply provide parameters to what would ordinarily
be a
> simple SQL SELECT statement that executes joins and includes WHERE
criteria.
> I am trying to get away from the method of writing all SQL for Access
2000
> forms, etc. in long VB strings. These are not process oriented or
business
> rules stored proc's, but simply a way of mimicking what is possible
with
> straightforward Access "parameter queries".
>
> If you have tips on using such a stored proc as the record source for
an
> Access form, report, or combo/list box please include that too! I
don't
> know if the best method will be trying to set the form's recordset
property,
> etc... still investigating.
Assuming that your stored procedure(s) return as an OUT parameter a REF
CURSOR (the result of your query), you should be able to simply call
the stored procedure like you would any other stored procedure, i.e.
{call myStoredProc( arg1, arg2, arg3 )}
except that you omit the REF CURSOR argument. The driver (at least the
Oracle OLE DB provider) will automatically return the REF CURSOR as the
result set.
Justin Cave
Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID:
<906mvn$u26$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<SswV5.18786$II2.1855235@newsread2.prod.itd.earthlink.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb53f,cd9961d7c9ae3002 X-Google-Attributes: gidfb53f,public X-Google-Thread: f99a8,cd9961d7c9ae3002 X-Google-Attributes: gidf99a8,public X-Google-Thread: fb992,cd9961d7c9ae3002 X-Google-Attributes: gidfb992,public X-Google-Thread: ff0ac,cd9961d7c9ae3002 X-Google-Attributes: gidff0ac,public From: jocave@my-deja.com Subject: Re: HOW TO: ADO 2.5 Oracle Stored Proc into Recordset Date: 2000/11/30 Message-ID: <906mvn$u26$1@nnrp1.deja.com> X-Deja-AN: 699706926 References: <SswV5.18786$II2.1855235@newsread2.prod.itd.earthlink.net> X-Http-Proxy: 1.1 x73.deja.com:80 (Squid/1.1.22) for client 12.6.234.120 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Nov 30 23:14:04 2000 GMT X-MyDeja-Info: XMYDJUIDjocave Newsgroups: comp.databases.ms-access,comp.databases.oracle.misc,comp.lang.visual.basic,hannover.uni.comp.oracle X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)