The simplest method is to use DriverManager.println(String message), which will write to the current log.
Filed under: JDBC | Leave a Comment »
The simplest method is to use DriverManager.println(String message), which will write to the current log.
Filed under: JDBC | Leave a Comment »
This term generally refers to Array, Blob and Clob data which is referred to in the database via SQL locators. “Materializing” the data means to return the actual data pointed to by the Locator. For Arrays, use the various forms of getArray() and getResultSet(). For Blobs, use getBinaryStream() or getBytes(long pos, int length). [...]
Filed under: JDBC | Leave a Comment »
Use the following method of PreparedStatement: public void setNull(int parameterIndex, int sqlType) throws SQLException
Filed under: JDBC | Leave a Comment »
TOMCAT throws the following exception when i try to connect to Oracle DB from JSP. javax.servlet.ServletException : oracle.jdbc.driver.OracleDriver Root Cause : java.lang.ClassNotFoundException: oracle:jdbc:driver:OracleDriver But, the Oracle JDBC driver ZIP file (classes111.zip)is available in the system classpath. The problem can be solved by using the following procedure: 1. [...]
Filed under: JDBC | Leave a Comment »
The DataSource class was introduced in the JDBC 2.0 Optional Package as an easier, more generic means of obtaining a Connection. The actual driver providing services is defined to the DataSource outside the application (Of course, a production quality app can and should provide this information outside the app anyway, usually with properties files or [...]
Filed under: JDBC | Leave a Comment »
An optimistic approach dispenses with locks (except during the actual update) and usually involves comparison of timestamps, or generations of data to ensure that data hasn’t changed between access and update times. It’s generally explained that the term optimistic is used because the expectation is that a clash between multiple updates to the same data [...]
Filed under: JDBC | Leave a Comment »
With a pessimistic approach, locks are used to ensure that no users, other than the one who holds the lock, can update data. It’s generally explained that the term pessimistic is used because the expectation is that many users will try to update the same data, so one is pessimistic that an update will be [...]
Filed under: JDBC | Leave a Comment »
setFetchSize(int) defines the number of rows that will be read from the database when the ResultSet needs more rows. The method in the java.sql.Statement interface will set the ‘default’ value for all the ResultSet derived from that Statement; the method in the java.sql.ResultSet interface will override that value for a specific ResultSet. Since database fetches [...]
Filed under: JDBC | Leave a Comment »
JDO provides for the transparent persistence of data in a data store agnostic manner, supporting object, hierarchical, as well as relational stores.
Filed under: JDBC | Leave a Comment »
With Oracle, console output from System.out.println() statements will be written to trace files in the Oracle UDUMP destination directory.
Filed under: JDBC | Leave a Comment »