Learn how to handle null database
When the adoption of a value, such as getInt, getLong, getFloat this method getXxx get from the database, the developer can call wasNull () method to find out whether the value null. WasNull return if true, then the developer can choose to use the basic types of suitable null value. GetXxx value obtained is closely related to JDBC driver.
For example, in a database-driven, it return 0, and the other might return to the default values that are listed, and perhaps a return to drive out in that the last value read.
So when you are ready to read the value NULL in the database, the default values to be careful, you may need to be used to encode the following:
int idx = resultSet.getInt (1);
if (resultSet.wasNull ())
idx = -1; / / this is our default value for idx
Jsp And Database Articles
- Example of a connection pool (from JIVE) (2)
- Example of a connection pool (from JIVE) (1)
- Optimize JDBC Programming
- JDBC connection with Oracle database (to resolve this problem, and would like to sum up are welcome to point out that lack of brothers)
- JDBC to connect oracle database top ten tips
- Through jdbc-odbc to Access database OLE types of table to insert data examples
- clob field to deal with the (oracle)
- To deal with a complete example of blob
- Correction method of remote database access! (Young master did not say it!)
- Dynamic use of JAVA agent database connection pool
- Oracle8 a jdbc connection examples (local page can )!!!!
- A realization method of database connection pool (1)
- A realization method of database connection pool (2)
- A realization method of database connection pool (3)
- Learn how to handle null database
- The establishment of object-oriented database
- JSP to connect SQL Server 2000 system configuration
- Access to database information using DatabaseMetaDate
- JAVA database connectivity issues do not have set up a data source
- J2ME visit procedures and Servlet Communication Access database
Can't Find What You're Looking For?
Rating: Not yet rated