Web Logic Server Question:
Download Questions PDF

How to write a program to call the store procedure of Oracle that takes no parameter?

Answer:

The stored procedure are the procedures that is called when a function need to use some internal variables. These variables are used to access the relational database system and used to play a big role in web logic server. The code that is given below shows the same:

CallableStatement cstmt = conn.prepareCall("Begin procName; END;");
cstmt.execute();
//procName is the name of an Oracle stored procedure.
//The above statement is the standard oracle statement that works with the Oracle DBMS. // The following syntax given below will call the stored procedure.
CallableStatement cstmt = conn.prepareCall("{call procName};");
cstmt.execute();
// This is the syntax which will work with all the database system.

Download Web Logic Server Interview Questions And Answers PDF

Previous QuestionNext Question
How to write a program to bind string values in a PreparedStatement?Do you know what type of object is returned by ResultSet.getObject()?