This week's book giveaway is in the Python forum.
We're giving away four copies of Hello World and have Warren & Carter Sande on-line!
See this thread for details.
Win a copy of Hello World this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Need Expert Advice

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this code below, I have to call it many times:
like: SHOW_PEG("Hiton", "5454", "14574");
is it possible to send a table of inputs
SHOW_PEG(Hotel[], dataId[],, recordId[]);
Because, for now I use the code below and I have to call it many times. I want to be able to send a result table and process all the queries within my oracle program.
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this sample by Oracle, Bobby.

Regards
Beksy
 
bobby, morkos
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you help me in modifying my code above. I can then use it as a reference. I hope you can help, to get my example working.

Originally posted by Beksy Kurian:
Try this sample by Oracle, Bobby.

Regards
Beksy

 
bobby, morkos
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by bobby, morkos:
[QB]Can you help me in modifying my code above. I can then use it as a reference. I hope you can help, to get my example working.

So, let me get it right, your saying that it is possible to send an array into a procedure and go through the array in that same procedure. What I have is I want to retrieve many record set and return it to my java program without going back and forth. Your code that you showed me is hard to understand. What I have is the following:
In my java program:
// Calling the Oracle procedure
String query = "begin :1 := SHOW_PEGASUS('"+ ownerId + "', '"+ propertyCode
+ "', '"+ chainCode + "'); end;";
CallableStatement cs = _con.prepareCall(query);
cs.registerOutParameter(1,OracleTypes.CURSOR);
cs.execute();
_rs=(ResultSet)cs.getObject(1);
And ownerId, property Code and chain code is a collection (An array that I loop through it).
Now, my procedure is as the following:

I hope you understand what I'm trying to do. And if you could show me how to modify my code in order to function, it would really help me. I just need this as a reference. I hope you can help me and I really appreciate any help. Thanks.
 
bobby, morkos
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your a life savier. I just want my code to work so that I can use it as a reference. Thanks for taking the time to help.

Originally posted by Beksy Kurian:
let me test the code and I will get back to you soon.
Beksy

 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Bobby! I did not get enough time to test at work. I can give you some pointers though. This code may have errors!!!Try it out!
oracle.sql.STRUCT is the most basic method of calling objects.

Beksy
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!