Answered Questions

  • How to Make Updates to Updatable Result Sets?

    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...

    kalyan789

    • Apr 23rd, 2009

    Following above answer, we can iterate through result set using, next() method and set corresponding column values for each row, using setInt/String/Float etc methods specifying column index or column name and value.Thankskalyan

    Ashwini

    • Oct 26th, 2005

    New Features of JDBC2.0To make a updateble resultset use,Resultset.CONCUR_UPDATABLE 

  • How can you use PreparedStatement?

    This special type of statement is derived from the more general class, Statement. If you want to execute a Statement object many times, it will normally reduce execution time to use a PreparedStatement object instead. The advantage to this is that in most cases, this SQL statement will be sent to the DBMS right away, where it will be compiled. As a result, the PreparedStatement object contains not...

  • What are the flow statements of JDBC?

    A URL string -->getConnection-->DriverManager-->Driver-->Connection-->Statement-->executeQuery-->ResultSet.

    Suresh Pendyala

    • May 8th, 2005

    1). Register the Driver 2) load the Driver 3)get the connection 4) create the statement 5) Execute the query 6) fetch the results with ResultSet