Thread View: comp.databases.ms-access
2 messages
2 total messages
Started by Hope Reyes
Thu, 30 Nov 2000 00:00
HOW TO: ADO 2.5 Oracle Stored Proc into Recordset
Author: Hope Reyes
Date: Thu, 30 Nov 2000 00:00
Date: Thu, 30 Nov 2000 00:00
26 lines
2873 bytes
2873 bytes
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. Thanks again, Hope Reyes
Re: HOW TO: ADO 2.5 Oracle Stored Proc into Recordset
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads