Solved

how to call a Oracle procedure ?

Posted on 2004-09-17
9
206 Views
Last Modified: 2010-03-31
hi experts,

I need to call an Oracle procedure from a java class, but don't know how to do it? thanks.
0
Comment
Question by:panpanW
  • 4
  • 3
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085465
0
 

Author Comment

by:panpanW
ID: 12085594
thanks, but it only tells us how to "Create" procedure, instead of "Invoking" procedure.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085643
There are related links there too, e.g.

http://javaalmanac.com/egs/java.sql/CallProcedure.html
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:panpanW
ID: 12085852
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.
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 35 total points
ID: 12086036
cs.setObject(1, yourListOfTest);
   
0
 

Author Comment

by:panpanW
ID: 12086091
thanks, but how to update table in the procedure? How to pass the Java class into the Oracle procedure to process it?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12086114
>>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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
network + 7 80
@SBGen Method 3 37
printing a file in reverse order is easy in recursion rather than in iteration 3 51
MySqlDump not dumping triggers 1 17
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now