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
Joined: Jul 11, 2001
Posts: 254
posted
0
Try this sample by Oracle, Bobby.
Regards Beksy
bobby, morkos
Ranch Hand
Joined: Jan 04, 2002
Posts: 82
posted
0
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
Joined: Jan 04, 2002
Posts: 82
posted
0
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
Joined: Jan 04, 2002
Posts: 82
posted
0
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
Joined: Jul 11, 2001
Posts: 254
posted
0
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.