Problems passing parameters to ORACLE stored procedure with ATL/OLEDB 
Author Message
 Problems passing parameters to ORACLE stored procedure with ATL/OLEDB

Have a project accessing an Oracle database, and some of the data is
passed/accessed via stored procedures.

Am using the wizard in VC6 (Insert->New ATL Object->Data
Access->Consumer then select the stored procedure) to generate the
skeleton for access, it also generates member variables for the accessor
class.

When I execute this to call the procedure "right out of the
box(wizard)", I get the following error from ORACLE:
        ORA-01460: unimplemented or unreasonable conversion requested

If I avoid the parameter conversion/binding by hard-coding the values
i.e.
        "{ CALL my_proc(1, 3) }"
instead of
        "{ CALL my_proc(?, ?) }"
it runs OK.

What am I doing wrong?
The parameters are declared as number in the procedure, and I have tried
to declare the member variables as int, long, char, DB_VARNUMERIC in the
accessor class, but still the same error.

Instead of the call to CDataSource::Open("MSDAORA") i call
CDataSource::OpenWithServiceComponents("MSDAORA").

Any ideas/hints?

-Alf



Fri, 25 Feb 2005 17:04:04 GMT  
 Problems passing parameters to ORACLE stored procedure with ATL/OLEDB
Haven't got any response on this.

Does this mean that
- Very few use ATL/OLEDB against ORACLE
- It's the wrong group (then guide me)
- I've done a trite error so no one bothers to answer
?

I have RTFM, browsed & searched the net, read KBs, searched CodeGuru but
still find very little regarding parameter passing in/out of procedures.

Should I use some other method to access the SP(ADO, ODBC)? Am using
ATL/OLEDB to access tables directly and that works fine, the problems is
related to SP.

-Alf (really stuck now)

Quote:

> Have a project accessing an Oracle database, and some of the data is
> passed/accessed via stored procedures.

> Am using the wizard in VC6 (Insert->New ATL Object->Data
> Access->Consumer then select the stored procedure) to generate the
> skeleton for access, it also generates member variables for the accessor
> class.

> When I execute this to call the procedure "right out of the
> box(wizard)", I get the following error from ORACLE:
>         ORA-01460: unimplemented or unreasonable conversion requested

> If I avoid the parameter conversion/binding by hard-coding the values
> i.e.
>         "{ CALL my_proc(1, 3) }"
> instead of
>         "{ CALL my_proc(?, ?) }"
> it runs OK.

> What am I doing wrong?
> The parameters are declared as number in the procedure, and I have tried
> to declare the member variables as int, long, char, DB_VARNUMERIC in the
> accessor class, but still the same error.

> Instead of the call to CDataSource::Open("MSDAORA") i call
> CDataSource::OpenWithServiceComponents("MSDAORA").

> Any ideas/hints?

> -Alf



Mon, 28 Feb 2005 14:24:56 GMT  
 Problems passing parameters to ORACLE stored procedure with ATL/OLEDB
Hi,
        why don't try OleDBPro, the best C++ OLEDB consumer library avalable
in the world, at http://www.udaparts.com?

Yuancai (Charlie) Ye
Fast accessing all of remote data sources anywhere with SocketPro using
batch/queue, non-blocking and parallel computation
See 30 well-tested and real OLEDB examples
at http://www.udaparts.com



Quote:
> Haven't got any response on this.

> Does this mean that
> - Very few use ATL/OLEDB against ORACLE
> - It's the wrong group (then guide me)
> - I've done a trite error so no one bothers to answer
> ?

> I have RTFM, browsed & searched the net, read KBs, searched CodeGuru but
> still find very little regarding parameter passing in/out of procedures.

> Should I use some other method to access the SP(ADO, ODBC)? Am using
> ATL/OLEDB to access tables directly and that works fine, the problems is
> related to SP.

> -Alf (really stuck now)


> > Have a project accessing an Oracle database, and some of the data is
> > passed/accessed via stored procedures.

> > Am using the wizard in VC6 (Insert->New ATL Object->Data
> > Access->Consumer then select the stored procedure) to generate the
> > skeleton for access, it also generates member variables for the accessor
> > class.

> > When I execute this to call the procedure "right out of the
> > box(wizard)", I get the following error from ORACLE:
> >         ORA-01460: unimplemented or unreasonable conversion requested

> > If I avoid the parameter conversion/binding by hard-coding the values
> > i.e.
> >         "{ CALL my_proc(1, 3) }"
> > instead of
> >         "{ CALL my_proc(?, ?) }"
> > it runs OK.

> > What am I doing wrong?
> > The parameters are declared as number in the procedure, and I have tried
> > to declare the member variables as int, long, char, DB_VARNUMERIC in the
> > accessor class, but still the same error.

> > Instead of the call to CDataSource::Open("MSDAORA") i call
> > CDataSource::OpenWithServiceComponents("MSDAORA").

> > Any ideas/hints?

> > -Alf



Tue, 01 Mar 2005 01:49:54 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems calling Oracle stored procedures from VC++ over ADO(OLEDB)

2. OleDb and Oracle Stored Procedures

3. Retrieving output parameters from Oracle stored procedure

4. passing array to stored procedure with oledb

5. how to pass array to oracle stored procedure?

6. ATL - >Oracle - >Stored Procedure

7. ATL - >Oracle - >Stored Procedure

8. How to pass parameter to a Stored Procedure of SQL Server

9. Stored Procedure problem with Oracle

10. Stored Procedure problem with Oracle

11. Problem with transfer parameters to a stored procedure using ADO

12. Connecting to oracle using stored proc. (oledb)

 

 
Powered by phpBB® Forum Software