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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mick BarryJava DeveloperCommented:
Register each of them with registerOutParameter()
tinh911Author Commented:
Please tell me more.
Your answer is too short.
tinh911Author Commented:
May be some sample line of code is good!
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Mick BarryJava DeveloperCommented:
sorry :-)

CallableStatement s = c.prepareCall("{call my_sp[(?, ?)]}");
s.registerOutParemater(1, Types.FLOAT);
s.registerOutParemater(2, Types.INTEGER);
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
Mick BarryJava DeveloperCommented:
Sorry again, you access them the same way you access any statement parameters:

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tinh911Author Commented:
Thank, you're certainly the one get my points!
Thanks again! :-)
Mick BarryJava DeveloperCommented:
Sorry I needed prodding :)

http://www.objects.com.au
tinh911Author Commented:
What site is it?
Mick BarryJava DeveloperCommented:
Thats my business, primarily doing Java consulting.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.