Link to home
Start Free TrialLog in
Avatar of panpanW
panpanW

asked on

how to call a Oracle procedure ?

hi experts,

I need to call an Oracle procedure from a java class, but don't know how to do it? thanks.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of panpanW
panpanW

ASKER

thanks, but it only tells us how to "Create" procedure, instead of "Invoking" procedure.
There are related links there too, e.g.

http://javaalmanac.com/egs/java.sql/CallProcedure.html
Avatar of panpanW

ASKER

thanks, but I need to pass an ArrayList of Class "test" into the procedure, and I don't know how to do it from the example.

Class test
{
 String name,
 int cust_id
}

**************
in the procedure, I need to check if the record has existed, if YES, then update the record, if NO, then insert the record.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of panpanW

ASKER

thanks, but how to update table in the procedure? How to pass the Java class into the Oracle procedure to process it?
>>thanks, but how to update table in the procedure?

Well that's really an Oracle question, not a Java question, is it not?

>>How to pass the Java class into the Oracle procedure to process it?

My last code example shows that