Question: which of the following statements is false regarding call to stored procedure from JDBC? a)Create a CallableStatement object.\nb)We need not make an instance of the Connection class before making a Callable statement.\nc)The execution call should be like CallableStatement cs = con.prepareCall("{call SHOW_SUPPLIERS}");\nd)A CallableStatement object contains a call to a stored procedure.

Answer: The answer is: b) \n\nExplanation\n\na) true. We have to create an instance of a CallableStatement object. This is how stored procedures are called in JDBC.\n\nb) false. We have to create an instance of a Connection, which serves as a factory for CallableStatements. An instance of CallableStatement is obtained from a Connection object by calling on of the prepareCall methods, e.g. http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#prepareCall(java.lang.String)\n\nc) true. See API documentation of CallableStatement: http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html\n\nd) true. This is what it does, and it becomes clear from the API documentation.
This question from the Yahoo Q&A forum is categorized in the topic: Business & Finance