View previous topic :: View next topic
|
Author |
Message |
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
IF I declare two resultset in stored proc,and in the cobol code open two cursor defined on two different global temporary table,what will happen?
In my shop...java calles the cobol -db2 stored proc,now if I define two cursor on two GTT and open same time..How Java will get those result set..? one by one...or on the same time? |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Both result sets will be available to Java once your stored procedure does its job. |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
So..java will get those on same time or in any order?
I have not ever seen how java gets those result set.
Can any one let me know about it Or send me the screenshots? |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
What do you mean by order ?
Its similar to : you insert two rows in a table and then issues the select stmt ; you will be getting both the rows.
Even i have not seen how java internally gets the result set.
Once return comes from the stored procedure you need to associate and allocate the result sets within java.
Google
"Writing a program to receive the result sets from a stored procedure" |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
But,
Is it confirm that sending two resultsets on same time is possible ?
Java will get those both samtime..or once at a time ? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
With due respect to Dick,
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
mad_guy wrote: |
But,
Is it confirm that sending two resultsets on same time is possible ?
Java will get those both samtime..or once at a time ? |
Answer is ... it depends. DB2 store procedure will send the data as a contiguous string, it depends on the Java Application (most probably a front-end screen) how that taclkes this string - one long string of information or two different chunks of information... |
|
Back to top |
|
|
|