|
| WebLogic Server 6.0 Code Examples, BEA Systems, Inc. |
SUMMARY: INNER | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |
examples.jdbc.informix4
Class PreparedStatementUnicode
java.lang.Object
|
+--examples.jdbc.informix4.PreparedStatementUnicode
- public class PreparedStatementUnicode
- extends java.lang.Object
This example makes a connection to a database that 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.
Build the Example
- Open a new command shell.
- Set up this development shell as described in
Setting up Your Environment for
Building and Running the Examples.
- Change connection parameters to correspond to your Informix Server configuration.
If you need more help, check the section on connecting
to a database in the programming 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 using the following command line:
$ javac -d %CLIENT_CLASSES% PreparedStatementUnicode.java
Run the Example
- Execute the following command in your development shell:
$ java examples.jdbc.informix4.PreparedStatementUnicode
There's More
For more information, see the programming guide Using WebLogic jDriver for Informix.
- Author:
- Copyright (c) 1999-2000 by BEA Systems, Inc. All rights reserved
Method Summary |
static void |
main(java.lang.String[] argv)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreparedStatementUnicode
public PreparedStatementUnicode()
main
public static void main(java.lang.String[] argv)
throws java.sql.SQLException
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.