How can we execute stored procedures?



How can we execute stored procedures?..

Answer / Arjun Kumar Sharma

To execute a stored procedure in JDBC, you can use the createStatement() or prepareStatement() methods to create a CallableStatement object. Then, set the parameters (if any), call the execute() method with CALL as the statement type, and retrieve the result using getResultSet(), getUpdateCount(), or getObjects(). Example: CallableStatement cs = con.prepareCall("{call myProcedure}");

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JDBC Interview Questions

What are jdbc and its components?

1 Answers  


What is database connection pooling? Advantages of using a connection pool?

1 Answers  


what exactly happens when we execute "Class.forname("Driver class name");"?Explain indetail

10 Answers   Accenture, HP, IBM, Infosys, SAP Labs, SAS, Sasken, Trigent, Wipro,


What is the role of class.forname while loading drivers?

1 Answers  


Explain about the Try Block?

1 Answers  


Is it possible to connect to multiple databases simultaneously? Using single statement can one update or extract data from multiple databases?

1 Answers  


What are the classes and methods used for sending sql statements to database?

1 Answers  


What are the ddl statements?

1 Answers  


Explain the difference between inner and outer join ?

1 Answers  


What is jdbc thin client in oracle?

1 Answers  


What is the difference between ojdbc6 and ojdbc7?

1 Answers  


Is jdbc connection secure?

1 Answers  


Categories