All Examples

package examples.jdbc.informix4

Class Index

  • SocketApplet
  • ConnectionApplet
  • SelectApplet
  • login
  • records
  • serializer
  • simpleselect
  • simplesql
  • sprocs
  • text
  • PreparedStatementUnicode
  • about this package

    This package contains sample applets and standalone applications that illustrate various JDBC programming tasks with WebLogic jDriver for Informix.

    You should test your connection to the Informix server with the dbping utility before you attempt to use the examples.

    how to use this package

    To set up an environment for running these examples:

    1. Open a new shell for running these examples.

      Set the CLASSPATH environment variable in that shell to include weblogic\informix4\classes.
      For example (Windows NT):

       $ set CLASSPATH=%CLASSPATH%;c:\weblogic\informix4\classes
      Where weblogic is the directory where you installed WebLogic jDriver for Informix.

    2. Change the database URL, login, and password connection parameters to correspond to your Microsoft SQL Server configuration. (For applets, the connection URL may be in the .html file or in the .java source file.) If you need more help, check the section on connecting to a database in the Developers Guide, Using WebLogic jDriver for Informix.

    3. Compile these examples by executing the following command in your development shell:

      $ javac -d c:\weblogic\informix4\classes *.java

      Where c:\weblogic is the path to the directory where you installed WebLogic jDriver for Informix.

    4. To run a standalone application, execute the following command in your development shell:

      $ java examples.jdbc.informix4.className

    5. To run an applet, load the associated .html file into a browser. Note that most browsers have security policies that restrict applets from connecting to computers other than the one the applet was served from. That means that you must install WebLogic jDriver for Informix, the webserver, and the database server all on one computer.

      For testing, you can use appletviewer, which is included in the JDK. appletviewer does not have the security restrictions. For example:

        appletviewer className.html
      See Using WebLogic jDriver for Informix for more information about applets and browser security.

    there's more . . .

    Read more about using this JDBC driver in the Developers Guide for WebLogic jDriver for Informix, Using WebLogic jDriver for Informix.