Html miscellaneous


  1. Number of rows is returned by the attribute __________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    rowsAffected attribute returns the number of rows that were changed by SQL. If there is no change by the SQL statement then this attribute will return zero. If we use “SELECT” statement, this attribute will always return zero.


  1. insertId attribute returns ____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    insertId attribute returns the row ID of the row of the inserted SQLResultSet object’s SQL statement that is inserted into the database. If multiple rows are inserted then the ID of the last row will be returned. If there is no row then INVALID_ACCESS_ERR exception will be raised.



  1. Which object is created for read-only transaction?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    For read-only transaction, we create the object SQLTransactionSync. If the first argument is NULL then we throw SQLException which is Error code 0. SQLTransactionSync object is fresh initially but when it is marked as stale it is committed or rolled back.


  1. Which error is invoked when SQLTransactionCallback does not execute?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    When SQLTransactionCallback, SQLStatementErrorCallback, SQLStatementCallback does not execute then INVALID_STATE_ERR error is raised. This error is raised from inside a SQLTransactionErrorCallback.



  1. Which method is used to verifythe version number?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    changeVersion() method automatically verify version number and it also changes it like doing a schema update. When this method is invoked it immediately returns and then run transaction steps asynchronously by taking transaction callback as the third argument, error callback as the fourth argument and success callback as the fifth argument.