If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > pass structure to procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-21-11, 11:21
Bobby123 Bobby123 is offline
Registered User
 
Join Date: Dec 2011
Posts: 10
pass structure to procedure

I am porting a DB2 ESQL to ORACLE ESQL. In DB2 we can pass a structure in procedure by statement

EXEC SQL CALL procedure_name USING DESCRIPTOR: structure_name;

i want to modify the above line for oracle.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 12-21-11, 12:00
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
Since I don't know DB2 or what a DB2 structure looks like
I don't know what might be equivalent in Oracle.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #3 (permalink)  
Old 12-21-11, 13:04
Bobby123 Bobby123 is offline
Registered User
 
Join Date: Dec 2011
Posts: 10
In ESQL/ORACLE we can call procedure BY

EXEC SQL CALL procedure_name(:tr_1,:tr_2,....);

If you can tell me how can i call that procedure using a C structure test1 which is

Struct testpr
{
int tr_1;
int tr_2;
.......
};

struct testpr test1;

instead of (:tr_1,:tr_2,....), that can also be helpful.
Reply With Quote
  #4 (permalink)  
Old 12-21-11, 13:37
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
I believe that TYPE datatype should meets your requirements.
I suggest you run some simple proof of concept tests to learn what actually works for you.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On