jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

View:
JDBC FAQ Home Page

FAQ Manager is guru Nils Christian Svihus.

Java Database Connectivity is the standard for communication between a Java application and a relational database. The JDBC API is released in two versions; JDBC version 1.22 (released with JDK 1.1.X in package java.sql) and version 2.0 (released with Java platform 2 in packages java.sql and javax.sql). It is a simple and powerful largely database-independent way of extracting and inserting data to or from any database. [FAQ Previously managed by Lennart Jorelid.]

What's New

How can I get a pooled connection?
Java:API:JDBC:Connections
John Zukowski PREMIUM, Jun 3, 2007
If the DataSource supports pooling connections, calling getConnetion() on the source will return a PooledConnection, instead of a plain Connection. The...
How can I get a pooled connection?
Java:API:JDBC:Connections
John Zukowski PREMIUM, Jun 3, 2007
If the DataSource supports pooling connections, calling getConnetion() on the source will return a PooledConnection, instead of a plain Connection. The...
Where can I read up more on JDBC 4.0?
Java:API:JDBC
John Zukowski PREMIUM, Jun 3, 2007
JDBC 4.0 is defined by JSR 221. Information is available through its JCP home at http://www.jcp.org/en/jsr/detail?id=221.

When was national character set support added to JDBC?
Java:API:JDBC:Character Sets
John Zukowski PREMIUM, Jun 3, 2007
National character set support is part of the JDBC 4.0 specification. It didn't quite make it into Java SE 6.0, though was available in early betas.
When was national character set support added to SQL?
Java:API:JDBC:SQL
John Zukowski PREMIUM, Jun 3, 2007
This is part of the SQL 2003 specification.
How do I check if a Connection is still valid / has been closed?
Java:API:JDBC:Connections
John Zukowski PREMIUM, Jun 3, 2007
With JDBC 4.0, you can call the isValid(int timeout) method. The timeout represents the number of seconds to wait for a reply. If no reply is acquired...
How can you find the cause of a SQL exception?
Java:API:JDBC:Exceptions and Warnings
John Zukowski PREMIUM, Jun 3, 2007
There are three areas where exception handling your JDBC code has improved with the changes in JDBC 4.0. First off, you can use the Java 5 for-each loop...
What's the difference between a transient and non-transient JDBC exception?
Java:API:JDBC:Exceptions and Warnings
John Zukowski PREMIUM, Jun 3, 2007
When making a JDBC call, an exception may happen. If performing the same task could succeed without changing anything, that exception is transient. For...
How do I setup my JDBC driver to be automatically loaded in Java 6?
Java:API:JDBC:Drivers
John Zukowski PREMIUM, Jun 3, 2007
Place the name of your java.sql.Driver implementation in the file META-INF/services/java.sql.Driver.
What is Derby?
Java:API:JDBC
John Zukowski PREMIUM, May 31, 2007
Derby is an open source relational database from Apache that is implemented entirely in Java and available under the Apache License. You can get it from...
How do I find out if my database supports row ids?
Java:API:JDBC:MetaData
John Zukowski PREMIUM, Sep 30, 2006
The Java 6 DatabaseMetaData class has a getRowIdLifetime() method that returns a RowIdLifetime, which has an enumeration of possible values: ROWID_...
How do you access the SQL row ID?
Java:API:JDBC:Queries
John Zukowski PREMIUM, Sep 30, 2006
Using ROWID as the column name in the query, you can use the Java 6 getRowId(columnNum) method.
How do you allow a PreparedStatement to be pooled?
Java:API:JDBC:Statements:Prepared
John Zukowski PREMIUM, Sep 30, 2006
The PreparedStatement has two methods in Java 6, isPoolable() and setPoolable(), so you can now request if a PreparedStatement can be pooled or not. ...
How do you check if a Connection hasn't been closed and is still valid?
Java:API:JDBC:Connections
John Zukowski PREMIUM, Sep 30, 2006
See the new isValid() method of Connection, added in Java 6.
What's the difference between a transient and non-transient exception?
Java:Language:Exceptions, Java:API:JDBC:Exceptions and Warnings
John Zukowski PREMIUM, Sep 30, 2006
Subclasses of SQLException have two types, transient and non-transient. Transient exceptions are those that when retried could succeed without changing...
Using Java 6, how do you loop through the causes of a SQL Exception?
Java:API:JDBC:Exceptions and Warnings
John Zukowski PREMIUM, Sep 30, 2006
The SQLException class is now Iterable in Java 6. try { ... } catch (SQLException sqle) { for(Throwable t : sqle) { System.out.pr...
How do I loop through the causes of a SQL Exception?
Java:API:JDBC:Exceptions and Warnings
John Zukowski PREMIUM, Sep 30, 2006
You can repeatedly call getCause() of the SQLException: try { ... } catch (SQLException sqle) { for(Throwable t : sqle) { System....
How do I loop through all the causes of a SQLException?
Java:API:JDBC:Exceptions and Warnings
John Zukowski PREMIUM, Sep 30, 2006
You can call the getCause() method of the exception repeatedly try { ... } catch (SQLException sqle) { for(Throwable t : sqle) { ...
How do I load a database driver with JDBC 4.0 / Java 6?
Java:API:JDBC:Drivers
John Zukowski PREMIUM, Sep 30, 2006
Provided the JAR file containing the driver is properly configured, just place the JAR file in the classpath. That's it. No need to manually load the class...
For loading and registering a driver you should use Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"), but I have used JdbcOdbcDriver j=new JdbcOdbcDriver() and I still get a connection. Why is this so?...
Java:API:JDBC, Java:Language:Semantics, Java:API:JDBC:Drivers
Byron Tymvios, Sep 26, 2006
Using Class.forName will create and initialize an instance of the class you pass in as a paramter. So using Class.forName will achieve the same result...
« previous beginning next »


Ask A Question



Related Links

JDBC Forum

Sun's JDBC pages

JDBC 2.0 optional package

Wish List
Features
About jGuru
Contact Us

 




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
ServerWatch.com Article: Virtualization Enters the SMB World
ITChannelPlanet.com Article: Emerging E-Discovery Market Grows More Vital for VARs
StoreVault Whitepaper: Introduction to Networked Storage
Oracle eBook: Implementing Business Intelligence in Your Organization
Hoovers Sales Tip: Building Credibility with New Clients
SAP Whitepaper: A Corporate Guide to Better Decisions Through IT
Microsoft Article: Flexibility, Agility the Keys to Dynamic IT
Microsoft Article: Improving Infrastructure Management for Mid-Size Companies
IBM Whitepaper: CIO Insights--Ignite Innovation by Fusing Business and IT
IBM Whitepaper: Transforming Legacy Apps into SOA
Internet.com eBook: All About Botnets
Intel Article: 8 Simple Rules for Designing Threaded Applications
Symantec Whitepaper: E-Mail Discovery--Worst-Case Scenarios Versus Best Practices
Ipswitch Whitepaper: Secure File Transfer In the Era of Regulatory Compliance
Symantec Whitepaper: A Unified, Proactive Approach to Endpoint Security
APC eBook: Putting the Green in IT
Intel Whitepaper: Best Practices for Developing and Optimizing Threaded Applications
Symantec Whitepaper: Emerging Trends in Fighting Spam
Oracle eBook: Guide to Oracle 11g and Database Migration
Symantec Whitepaper: Best Practices for IM Archiving & Compliance
Intel Article: The Challenges of Developing Multithreaded Processing Pipelines
Avaya Whitepaper: SIP--Creating Next-Generation Telecom Applications
Avaya Article: Event Processing Demands Real-Time Response for Communications-Enabled Business Apps
MessageLabs Whitepaper: Spam Spikes--A Real Risk to Your Business
Symantec Article: Guarding the Corporate Gateway
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Epicor Webcast: Requirements to Consider When Looking at ITSM Tools
Intel Video: Three Must-Knows for Parallelism
Microsoft: NXT Web Seminar Series
Microsoft Partner Program Video: The Secrets to Partner Success
Rational Asset Manager: Succeed with Asset-based Development
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
NXPowerLite: Desktop Edition Software Trial
IBM Rational Systems Development Solution e-Kit
IBM SOA Development Survival Guide eKit
Evaluate IBM Rational Build Forge Online
IBM Enterprise Architect eKit for SOA
Evaluate Rational Application Developer Online
Iron Speed Designer Application Generator
Symantec IM Detection Utility
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM Overview Video: Next Generation Data Warehousing
IBM Tutorial: Intro to XML User Interface Language (XUL) Development
Microsoft How-to Article: Get Going with Silverlight and Windows Live
IBM Tutorial: The Ajax Transport Method
IBM Tutorial: Learning PHP
IBM Tutorial: Validating XML
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES