JDBC Section Index | Page 5
What isolation level is used by the DBMS when inserting, updating and selecting rows from a database?
The answer depends on both your code and the DBMS. If the program does not explicitly set the isolation level, the DBMS default is used. You can determine the default using DatabaseMetaData.getD...more
Use DatabaseMetaData.supportsTransactionIsolationLevel(int level). See also: How does one manage concurrency issues with JDBC?
I want to connect to remote database using a program that is running in the local network behind the proxy. Is that possible?
Connecting to a database through the Proxy I want to connect to remote database using a program that is running in the local network behind the proxy. Is that possible?
Stored procedures can return a result parameter, which can be a result set. For a discussion of standard JDBC syntax for dealing with result, IN, IN/OUT and OUT parameters, see Stored Procedures....more
The simplest method is to use DriverManager.println(String message), which will write to the current log.
As of JDBC 2.0, use DriverManager.getLogWriter() and DriverManager.setLogWriter(PrintWriter out). Prior to JDBC 2.0, the DriverManager methods getLogStream() and setLogStream(PrintStream out) wer...more
This term generally refers to Array, Blob and Clob data which is referred to in the database via SQL locators ( see What is an SQL Locator? ) "Materializing" the data means to return the actual d...more
Most DBMS vendors have implemented these types via the SQL3 Locator type ( see What is an SQL Locator? and the JDBC 2.1 core API specifies "By default, a JDBC driver should implement the Blob and ...more
A Locator is an SQL3 data type that acts as a logical pointer to data that resides on a database server. Read "logical pointer" here as an identifier the DBMS can use to locate and manipulate the...more
A JDBC driver may accept any number of properties to tune or optimize performance for the specific driver. There is no standard, other than user and password, for what these properties should be....more
This is not the problem it once was, although your hard drive may groan. Many of the major DBMS vendors now offer personal or developer versions for download at no cost. The J2EE download also i...more
Few companies can really afford NOT to use a DBMS. If nothing else, developer time spent on custom persistence methods can quickly surpass the cost of a DBMS. If the company doesn't understand t...more
First, it should be pointed out that PreparedStatement handles many issues for the developer and normally should be preferred over a standard Statement. Otherwise, the JDBC syntax is really the s...more
Use DatabaseMetaData.getMaxConnections() and compare to the number of connections currently open. Note that a return value of zero can mean unlimited or, unfortunately, unknown. Of course, drive...more
Many connections from an Oracle8i pooled connection returns statement closed. I am using import oracle.jdbc.pool.* with thin driver. If I test with many simultaneous connections, I get an SQLExcep...more