Topic: JDBC 字符集之间转换问题 |
Print this page |
1.JDBC 字符集之间转换问题 | Copy to clipboard |
Posted by: rexlee Posted on: 2003-11-07 15:46 在database中设置的是UTF8字符集 然后用JDBC捞数据时就会出现下列错误。 不能在 UTF8 和 UCS2 之间转换: failUTF8Conv 请问这是怎么回事,我应该怎么处理呢 Thanks. PS: 下面是详细错误代码: java.sql.SQLException: 不能在 UTF8 和 UCS2 之间转换: failUTF8Conv at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210) at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829) at oracle.jdbc.dbaccess.DBConversion.failUTF8Conv(DBConversion.java:1746) at oracle.jdbc.dbaccess.DBConversion.utf8BytesToJavaChars(DBConversion.java:1585) at oracle.jdbc.dbaccess.DBConversion.utf8BytesToString(DBConversion.java:1445) at oracle.jdbc.dbaccess.DBConversion.CharBytesToString(DBConversion.java:384) at oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatement.java:2571) at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:305) at woms.ord.jawomordm001.jawomordm001001servlet.setbyPostalCode(jawomordm001001servlet.java:966) |
2.Re:JDBC 字符集之间转换问题 [Re: rexlee] | Copy to clipboard |
Posted by: enhydra Posted on: 2003-11-07 17:52 Oracle的版本? JDBC Driver的版本是否是和Oracle版本完全配合的? 我曾经碰到9.2 的Driver连接9.1 的Oracle,就有莫名其妙的问题. 另外,你为什么要用UCS2呢? |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |