INFORMIX
Informix JDBC Driver Programmer's Guide
Appendix A: Sample Code
Contents Index
This appendix contains the full text for most of the code examples provided or referred to in other chapters. The example files are also included in the product.

UNIX
The examples that do not use RMI are located in the directory $JDBCLOCATION/demo/basic, where JDBCLOCATION refers to the directory where you installed Informix JDBC Driver.

The RMI example is located in the directory $JDBCLOCATION/demo/rmi. There are many parts to this example, so the full text is not provided in this appendix. A README file in the demo directory explains how to execute the example.

Another set of examples are located in the directory $JDBCLOCATION/demo/stores7. A README file in the demo directory explains the various demos and how to execute them.

Windows
The examples that do not use RMI are located in the directory %JDBCLOCATION%\demo\basic, where JDBCLOCATION refers to the directory where you installed Informix JDBC Driver.

The RMI example is located in the directory %JDBCLOCATION%\demo\rmi. There are many parts to this example, so the full text is not provided in this appendix. A README file in the demo directory explains how to execute the example.

Another set of examples are located in the directory %JDBCLOCATION%\demo\stores7. A README file in the demo directory explains the various demos and how to execute them.

The following table displays the name of the Java program, a brief description of what the program does, and the page where you can find it.

Demo Program Name Description Page

autofree.java

Shows how to use the AUTOFREE environment variable.

A-3

ByteType.java

Shows how to insert into and select from a table that contains a column of data type BYTE.

A-7

CreateDB.java

Creates a database called testDB.

A-12

DBConnection.java

Creates connections to both a database and a database server.

A-14

DBMetaData.java

Shows how to retrieve information about a database with the DatabaseMetaData interface.

A-17

DropDB.java

Drops a database called testDB.

A-23

Interval.java

Shows how to insert and select Informix interval data.

A-25

MultiRowCall.java

Shows how to return multiple rows in a stored procedure call.

A-29

OptimizedSelect.java

Shows how to use the FET_BUF_SIZE environment variable to adjust the Informix JDBC Driver tuple buffer size.

A-32

optofc.java

Shows how to use the OPTOFC environment variable.

A-36

PropertyConnection.java

Shows how to specify connection environment variables via a property list.

A-40

RSMetaData.java

Shows how to retrieve information about a result set with the ResultSetMetaData interface.

A-43

SimpleCall.java

Shows how to call a stored procedure.

A-48

SimpleConnection.java

Shows how to connect to a database or database server.

A-52

SimpleSelect.java

Shows how to send a simple SELECT query to the database server.

A-54

TextType.java

Shows how to insert into and select from a table that contains a column of data type TEXT.

A-58




Informix JDBC Driver Programmer's Guide, Version 1.22
Copyright © 1998, Informix Software, Inc. All rights reserved.