Stored Procedure with multi OUTPUT parameters!

A stored procedure in Microsoft SQL Server 2000 can have parameters and OUTPUT parameters.
I want to get all the OUTPUT parameters back in my Java program.
Please help! Thanx.
tinh911Asked:
Who is Participating?
 
objectsCommented:
Sorry again, you access them the same way you access any statement parameters:

int x = s.getInt(1);
float f = s.getFloat(2);

0
 
objectsCommented:
Register each of them with registerOutParameter()
0
 
tinh911Author Commented:
Please tell me more.
Your answer is too short.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
tinh911Author Commented:
May be some sample line of code is good!
0
 
objectsCommented:
sorry :-)

CallableStatement s = c.prepareCall("{call my_sp[(?, ?)]}");
s.registerOutParemater(1, Types.FLOAT);
s.registerOutParemater(2, Types.INTEGER);
0
 
tinh911Author Commented:
Yes, it's great, how can I put the OUTPUT parameter in a variable, for example INTEGER myInt. Can I write like this:
myInt = s.someMethod();//to put the OUTPUT parameter in myInt
0
 
tinh911Author Commented:
Thank, you're certainly the one get my points!
Thanks again! :-)
0
 
objectsCommented:
Sorry I needed prodding :)

http://www.objects.com.au
0
 
tinh911Author Commented:
What site is it?
0
 
objectsCommented:
Thats my business, primarily doing Java consulting.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.