About Question enthuware.ocpjp.v7.2.1370 : Inaccurate statement about CallableStatement?

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
kristwaa

About Question enthuware.ocpjp.v7.2.1370 : Inaccurate statement about CallableStatement?

Post by kristwaa »

In the question ([1]) about CallableStatement one of the options is:
"A CallableStatement is the only way for a Java program to execute stored procedures in the database."

Maybe that's the intention ([2]), but I'm not convinced it is true.
If the stored procedure doesn't have an output parameter you can use a PreparedStatement. If the stored procedure doesn't take any input parameters you can use a Statement - or maybe even build the call string with the parameters, which is not recommended for several reasons (security, performance, style).
Is the statement based on the API docs / specification, or on experience with a particular database system?

No big deal, but I didn't tick this option and failed the question :) What do you think?


Regards,
--
Kristian

[1] enthuware.ocpjp.v7.2.1370
[2] From the Java 7 API docs about CallableStatement: "The interface used to execute SQL stored procedures"

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1370 : Inaccurate statement about CallableStatement?

Post by admin »

You are right. The option has now been updated.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests