File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Expert Advice

 
bobby, morkos
Ranch Hand
Posts: 82
  • 0
  • 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.
 
Beksy Kurian
Ranch Hand
Posts: 254
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic