All Examples This Package
Class examples.jdbc.informix4.PreparedStatementUnicode
examples.jdbc.informix4.PreparedStatementUnicode
- public class PreparedStatementUnicode
This example makes a connection to a database which is using a
multibyte codeset. You will need to specify the proper URL and codeset
for your database. Consult your Informix installation guide for more
information.
The example inserts three Unicode characters into a
database and then performs a Select statement and reads the data back
into a Result Set. The data is then read in via getUnicodeStream,
converted to it's hexadecimal value, and displayed.
To set up this example:
- Set up your development shell as described in Package examples.jdbc.informix4.
- Change connection parameters to correspond to your Informix
Dynamic Server configuration. If you need more help, check the section on
connecting to a database in the Developers Guide, Using WebLogic jDriver for Informix.
- Change the line containing weblogic.codeset=myCodeset, replacing myCodeset with the name of the
codeset used by your database. For testing, try using "cp850".
- Compile this example by executing the following command in your development shell:
$ javac -d c:/weblogic/informix4/classes PreparedStatementUnicode.java
- Run this example by executing the following command in your development shell:
$ java examples.jdbc.informix4.PreparedStatementUnicode
- Author:
- Copyright (c) 1999-2000 by BEA Systems, Inc. All rights reserved
-
PreparedStatementUnicode()
-
-
main(String[])
-
PreparedStatementUnicode
public PreparedStatementUnicode()
main
public static void main(String argv[]) throws SQLException
All Examples This Package