About Question enthuware.ocpjp.v7.2.1372 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
The_Nick
Posts: 132
Joined: Thu May 16, 2013 9:23 am
Contact:

About Question enthuware.ocpjp.v7.2.1372 :

Post by The_Nick »

Related to CallableStatement, here from the official API: http://docs.oracle.com/javase/7/docs/ap ... ,%20int%29
If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.
What do they mean with "accepts a scale value"?

Thanks in advance.

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

Re: About Question enthuware.ocpjp.v7.2.1372 :

Post by admin »


hamada.yamasaki
Posts: 17
Joined: Fri Oct 11, 2013 10:31 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1372 :

Post by hamada.yamasaki »

Is there some transaction related stuff for CallableStatement vs Prepared Statement that these two statements handle differently from point of view of exam? Because i wrote some example code for callable and prepared statement but haven't benchmark the transaction performances.
Thanks

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

Re: About Question enthuware.ocpjp.v7.2.1372 :

Post by admin »

No, we haven't see anything specific to CallableStatement vs PreparedStatement.

winddd
Posts: 18
Joined: Wed Feb 11, 2015 10:48 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1372 :

Post by winddd »

A CallableStatement is easier to build and call from JDBC code than a PreparedStatement.
This is true because you don't have to write any SQL query in Java code. You just use the name of the stored procedure. The queries are already there inside the stored procedure, which exists in the Database and not in JDBC code.
Absolutely incorrect. Сreation and use in both cases is identical. The difficulties connected with SQL don't belong to a subject. Moreover, syntax for a call of procedures really is always effaced from the memory, whereas syntax of simple queries - no.

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

Re: About Question enthuware.ocpjp.v7.2.1372 :

Post by admin »

I agree that it is not a good option. You may expect such options in the real exam though.
thank you,
Paul.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests