Topic: 请高手帮忙解决插入中文数据异常

  Print this page

1.请高手帮忙解决插入中文数据异常 Copy to clipboard
Posted by: linkeca
Posted on: 2005-10-21 17:04

我使用以下中文转换:
String book_type;
book_type=request.getParameter("book_type");
byte[] tmpbyte=book_type.getBytes("ISO8859_1");
book_type=new String(tmpbyte);

sql2="insert into book_msg values('"+book_id+"','"+book_type+"','"+book_name+"','"+book_author+"','"+book_publisher+"','"+book_owner+"')";
但不能通过编译!!请帮忙解决
出错信息:An error occurred at line: 23 in the jsp file: /houtaiguanli/check_addbook.jsp
Generated servlet error:
D:\Tomcat\work\Catalina\localhost\library-system\org\apache\jsp\houtaiguanli\check_005faddbook_jsp.java:87: tmpbyte is already defined in _jspService(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
byte[] tmpbyte=book_author.getBytes("ISO8859_1");
^

2.Re:请高手帮忙解决插入中文数据异常 [Re: linkeca] Copy to clipboard
Posted by: pp_car
Posted on: 2005-10-30 14:15

http://www.cjsdn.net/post/view?bid=10&id=158877&sty=1&tpg=1&age=0


   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