JAVA JDBC Programming Interview Questions and Answers

JDBC Questions and Answers:

1 :: How you restrict a user to cut and paste from the html page using JAVA Programing?

Using JavaScript to lock keyboard keys. It is one of easiest solutions.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

2 :: What is Serialization and deserialization in JAVA Programming?

Serialization is the process of writing the state of an object to a byte stream.
Deserialization is the process of restoring these objects.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

3 :: How to Make Updates to Updatable Result Sets in JDBC?

Another new feature in the JDBC 2.0 API is the ability to update rows in a result set using methods in the Java programming language rather than having to send an SQL command. But before you can take advantage of this capability, you need to create a ResultSet object that is updatable. In order to do this, you supply the ResultSet constant CONCUR_UPDATABLE to the createStatement method.

E.g.
Connection con = DriverManager.getConnection(”jdbc:mySubprotocol:mySubName”);
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet uprs = (”SELECT COF_NAME, PRICE FROM COFFEES”);
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

4 :: How to Retrieve Warnings in JDBC?

SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as planned. A warning can be reported on a Connection object, a Statement object (including PreparedStatement and CallableStatement objects), or a ResultSet object. Each of these classes has a getWarnings method, which you must invoke in order to see the first warning reported on the calling object

E.g.

SQLWarning warning = stmt.getWarnings();
if (warning != null) {

while (warning != null) {
System.out.println(”Message: ” + warning.getMessage());
System.out.println(”SQLState: ” + warning.getSQLState());
System.out.print(”Vendor error code: “);
System.out.println(warning.getErrorCode());
warning = warning.getNextWarning();
}
}
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

5 :: How to call a Stored Procedure from JDBC?

The first step is to create a CallableStatement object. As with Statement an and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a stored procedure;

E.g.
CallableStatement cs = con.prepareCall(”{call SHOW_SUPPLIERS}”);
ResultSet rs = cs.executeQuery();
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

Rate This Category:
0/5 Rating (0 vote)
Place Your Question



Top: JAVA JDBC Programming Interview Questions and Answers
JAVA JDBC Programming Interview Questions and Answers

Top Frequently Asked JDBC Question
Frequently Asked JDBC Job Interview Question


Top Frequently opened Java Programing Job Interview categories
Most popular Java Programing Job Interview categories

Comments About JAVA JDBC Programming Interview Questions and Answers

Share your valuable opinions, ideas and suggestions about JAVA JDBC Programming Interview Questions and Answers
While placing your comment your email address is required but won't be published any where else; Personal information will be kept confidential; we do not sell or release our respective visitors private information.
  1. Webmaster 22nd of May 2012

    Webmaster Said

    Tell us what you feel about JAVA JDBC Programming Interview Questions and Answers
    All comments will be published after review. No login or registration is required to post a comment on JAVA JDBC Programming Interview Questions and Answers We offer and invite you to submit your valuable comment now; Please be respectful of others when commenting. Insulting others, self-promotional comments, website promotional comments, marketing stuff, SEO Techniques, SMS-style content and off-topic comments will not be approved at this information portal.
    So start sharing your thoughts regarding JAVA JDBC Programming Interview Questions and Answers
    Thank you.

Leave a Comment

Leave a Comment
  1.  Enter This Verification Code  Regenerate Verification Code  



Your reply will be added to the comment above (Below any other replies to this comment) -

Top Comments About: JAVA JDBC Programming Interview Questions and Answers
Comments on JAVA JDBC Programming Interview Questions and Answers

 
Top of Link batk to JAVA JDBC Programming Interview Questions and Answers
Link batk to JAVA JDBC Programming Interview Questions and Answers