Home
|
Previous Page
|
Next Page
Contents
Introduction
In This Introduction
IBM Informix Java Documentation
About This Manual
Organization of This Manual
Supplementary JDBC Documentation
Material Not Covered
Types of Users
Software Dependencies
Assumptions About Your Locale
New Features
Features Added for IBM Informix JDBC Driver, Version 2.21.JC5
Features New to IBM Informix JDBC Driver, Version 2.21.JC4
Documentation Conventions
Typographical Conventions
Feature, Product, and Platform
Syntax Diagrams
Example Code Conventions
Additional Documentation
Installation Guides
Online Notes
Informix Error Messages
Manuals
Online Help
Accessibility
IBM Informix Dynamic Server Version 10.0 and CSDK Version 2.90 Documentation Set
Compliance with Industry Standards
IBM Welcomes Your Comments
Getting Started
In This Chapter
What Is JDBC?
What Is a JDBC Driver?
Overview of IBM Informix JDBC Driver
Classes Implemented in IBM Informix JDBC Driver
Files in IBM Informix JDBC Driver
Client- and Server-Side JDBC Drivers
Installing the Driver
Installing in Graphical Mode
Installing in Console Mode
Installing in Silent Mode
Logging Install Events
Using the Driver in an Application
Using the Driver in an Applet
Uninstalling the Driver
Connecting to the Database
In This Chapter
Loading IBM Informix JDBC Driver
Using a DataSource Object
Using the DriverManager.getConnection() Method
Format of Database URLs
Database Versus Database Server Connections
Specifying Properties
Using Informix Environment Variables
Dynamically Reading the Informix sqlhosts File
Connection Property Syntax
Administration Requirements
Utilities to Update the LDAP Server with sqlhosts Data
Using High-Availability Data Replication
Secondary Server Connection Properties
Checking for Read-Only Status
Retrying Connections
Using an HTTP Proxy Server
Configuring Your Environment to Use a Proxy Server
Using the Proxy with an LDAP Server
Specifying sqlhosts File Lookup
Using Other Multitier Solutions
Encryption Options
Using the JCE Security Package
Using Password Encryption
Using Network Encryption
PAM Authentication Method
Using PAM in JDBC
Closing the Connection
Performing Database Operations
In This Chapter
Querying the Database
Example of Sending a Query to an Informix Database
Using Result Sets
Deallocating Resources
Executing Across Threads
Using Scroll Cursors
Using Hold Cursors
Updating the Database
Performing Batch Updates
Performing Bulk Inserts
Parameters, Escape Syntax, and Unsupported Methods
Using CallableStatement OUT Parameters
JDBC Support for DESCRIBE INPUT
Using Escape Syntax
Unsupported Methods and Methods that Behave Differently
Handling Transactions
Handling Errors
Handling Errors With the SQLException Class
Retrieving the Syntax Error Offset
Handling Errors with the com.informix.jdbc.Message Class
Accessing Database Metadata
Other Informix Extensions to the JDBC API
Using the Auto Free Feature
Obtaining Driver Version Information
Storing and Retrieving XML Documents
Setting Up Your Environment to Use XML Methods
Inserting Data
Retrieving Data
Inserting Data Examples
Retrieving Data Examples
Working With Informix Types
In This Chapter
Distinct Data Types
Inserting Data Examples
Retrieving Data Example
Unsupported Methods
BYTE and TEXT Data Types
Caching Large Objects
Example: Inserting or Updating Data
Example: Selecting Data
SERIAL and SERIAL8 Data Types
INTERVAL Data Type
The Interval Class
The IntervalYM Class
The IntervalDF Class
Interval Example
Collections and Arrays
Collection Examples
Array Example
Named and Unnamed Rows
Interval and Collection Support
Unsupported Methods
Using the SQLData Interface
Using the Struct Interface
Using the ClassGenerator Utility
Caching Type Information
Smart Large Object Data Types
Smart Large Objects in the Database Server
Smart Large Objects in a Client Application
Performing Operations on Smart Large Objects
Working with Storage Characteristics
Working with Status Characteristics
Working with Locks
Caching Large Objects
Smart Large Object Examples
Working with Opaque Types
In This Chapter
Using the IfmxUDTSQLInput Interface
Reading Data
Positioning in the Data Stream
Setting or Obtaining Data Attributes
Using the IfmxUDTSQLOutput Interface
Mapping Opaque Data Types
Caching Type Information
Unsupported Methods
Creating Opaque Types and UDRs
Overview of Creating Opaque Types and UDRs
Preparing to Create Opaque Types and UDRs
Steps to Creating Opaque Types
Steps to Creating UDRs
Requirements for the Java Class
SQL Names
Specifying Characteristics for an Opaque Type
Creating the JAR and Class Files
Sending the Class Definition to the Database Server
Creating an Opaque Type from Existing Code
Removing Opaque Types and JAR Files
Creating UDRs
Removing UDRs and JAR Files
Obtaining Information About Opaque Types and UDRs
Executing in a Transaction
Examples
Class Definition
Inserting Data
Retrieving Data
Using Smart Large Objects Within an Opaque Type
Creating an Opaque Type from an Existing Java Class with UDTManager
Creating an Opaque Type Without an Existing Java Class
Creating UDRs with UDRManager
Internationalization and Date Formats
In This Chapter
Support for JDK and Internationalization
Support for IBM Informix GLS Variables
Support for DATE End-User Formats
GL_DATE Variable
DBDATE Variable
DBCENTURY Variable
Precedence Rules for End-User Formats
Support for Code-Set Conversion
Unicode to Database Code Set
Unicode to Client Code Set
Connecting to a Database with Non-ASCII Characters
Code-Set Conversion for TEXT Data Types
User-Defined Locales
Support for Localized Error Messages
Tuning and Troubleshooting
In This Chapter
Debugging Your JDBC API Program
Managing Performance
The FET_BUF_SIZE and BIG_FET_BUF_SIZE Environment Variables
Managing Memory for Large Objects
Reducing Network Traffic
Using Bulk Inserts
Using a Connection Pool
Appendix A. Sample Code Files
Summary of Available Examples
Examples in the demo Directory
Examples in the tools Directory
Appendix B. DataSource Extensions
Reading and Writing Properties
Getting and Setting Standard Properties
Getting and Setting Informix Connection Properties
Getting and Setting Connection Pool DataSource Properties
Appendix C. Mapping Data Types
Data Type Mapping Between Informix and JDBC Data Types
Data Type Mapping Between Extended Types and Java and JDBC Types
Data Type Mapping Between C Opaque Types and Java
Data Type Mapping for PreparedStatement.setXXX() Extensions
Using the Mapping Extensions
Using the IfxTypes Class
Extension Summary
Data Type Mapping for ResultSet.getXXX() Methods
Data Type Mapping for UDT Manager and UDR Manager
Mapping for Casts
Mapping for Field Types
Appendix D. Accessibility
Dotted Decimal Syntax Diagrams
Glossary
Error Messages
Notices
Trademarks
Index
Home
| [
Top of Page
|
Previous Page
|
Next Page
|
Contents
|
Index
]