Topic: 如何用jspsmartupload组件把图片直接上传到sqlserver2000数据库 |
Print this page |
1.如何用jspsmartupload组件把图片直接上传到sqlserver2000数据库 | Copy to clipboard |
Posted by: zonghao Posted on: 2007-11-16 09:15 如题,数据库字段类型为image,请问怎么写,谢谢给个代码! 我这有简单的一点程序,大家在上面补充吧!谁能解决,50分就是谁的 <%@ page contentType="text/html;charset=gb2312" %> <%@ include file="getobject.jsp" %> <%@ page import="java.util.*,com.jspsmart.upload.*" %> <html> <body> <% SmartUpload su = new SmartUpload(); su.initialize(this.getServletConfig(),request,response); su.upload(); int count = su.save("/upload"); com.jspsmart.upload.File file = su.getFiles().getFile(0); if (file.isMissing()){} else { String imgname=file.getFileName(); } try { //stmt.executeUpdate("insert into photo values("")"); }catch(Exception e) { out.println(e.getMessage()); } %> </body> </html> |
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 |