What is phantom read and which isolation level prevents it?
Answer / Pradip Kumar Dubey
"Phantom Read" occurs in database transactions when a transaction re-reads data that was inserted or deleted by another concurrent transaction. This leads to inconsistent results as the data has changed between the initial read and the final commit. The isolation level that prevents Phantom Read is "REPEATABLE_READ". In JDBC, this can be set using the Connection object's setTransactionIsolation method.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is odbc jdbc?
dear friends I have made connection with SQLSERVER where the following code is compiling properly but giving error at the runtime . I think error in this line where i am sending the value through string Connection connection = DriverManager.getConnection ( "jdbc:microsoft:sqlserver://localhost:1433","sa",""); import java.sql.*; //import mssqlserver.*; public class TestSQLCON { public TestSQLCON() throws Exception { // Get connection DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver()); System.out.println(); System.out.println("Successfully connected one"); System.out.println(); Connection connection = DriverManager.getConnection ( "jdbc:microsoft:sqlserver://localhost:1433","sa",""); if (connection != null) { System.out.println(); System.out.println("Successfully connected"); System.out.println(); // Meta data DatabaseMetaData meta = connection.getMetaData(); System.out.println("\nDriver Information"); System.out.println("Driver Name: " + meta.getDriverName()); System.out.println("Driver Version: " + meta.getDriverVersion()); System.out.println("\nDatabase Information "); System.out.println("Database Name: " + meta.getDatabaseProductName()); System.out.println("Database Version: "+ meta.getDatabaseProductVersion()); } } public static void main (String args[]) throws Exception { TestSQLCON test = new TestSQLCON(); } } so please help me
What is a lock in jdbc?
How to find number of records in result set?
How do I insert an image file (or other raw data) into a database?
Is the JDBC-ODBC Bridge multi-threaded?
Are all the required JDBC drivers to establish connectivity to my database part of the JDK?
preparedstatement p= new preparedstatement is it possible ?
10 Answers Fidelity, IBM, Infrasys,
Why is jdbc used?
What is sqlwarning and discuss the procedure of retrieving warnings?
Write an sql to find all records having all upper case alphanumeric characters in a field ?
Once I have the Java 2 SDK, Standard Edition, from Sun, what else do I need to connect to a database?