四个本问题的贴子至今没有任何人可以回答,全部都是可以啊,行啊,没问题啊
没有任何代码证明我的信箱是 [email protected]
收到可行代码立刻结贴送分
http://community.csdn.net/Expert/topic/3638/3638776.xml?temp=.6011927
http://community.csdn.net/Expert/topic/3637/3637320.xml?temp=.0927698
http://community.csdn.net/Expert/topic/3638/3638807.xml?temp=.9520227
http://community.csdn.net/Expert/topic/3638/3638773.xml?temp=.4013636
没有任何代码证明我的信箱是 [email protected]
收到可行代码立刻结贴送分
http://community.csdn.net/Expert/topic/3638/3638776.xml?temp=.6011927
http://community.csdn.net/Expert/topic/3637/3637320.xml?temp=.0927698
http://community.csdn.net/Expert/topic/3638/3638807.xml?temp=.9520227
http://community.csdn.net/Expert/topic/3638/3638773.xml?temp=.4013636
解决方案 »
- mysql中因文本太长,无法插入数据如何解决?求高手指点
- mysql查询sql语句
- 求SQL语句(MYSQL)
- 关于Mysql的安装
- 在mysql5中使用中文表名,中文字段名在开发中会有问题么?
- 在mysql里我用root用户建了个mydb数据库,请问我怎样可以新建一个用户,并且使该用户拥有新数据库mydb的表有类似develop的权限.
- SQL中含有特殊字符,进行查询时会出错,怎么办?
- Linux 下 MySQL 对目录没有访问权限,怎么改???
- phpmyadmin导入CSV时报错Invalid parameter for CSV import转义字段的字符
- 求教sum之后如何显示最近的时间
- 安裝mySQL后配置時出現問題,請指點。(新手)
- 怎样在MySQL里保存二进制数据?
Connection conn = DriverManager.getConnection(url,"test","123456");;
PreparedStatement statement = null;String photo="你数据库服务器上图片的完整地址(比如/tmp/test.jpg,不在服务器的要上传,可以利用jsp smartupload或struts等)";
File file = new File(photo);
FileInputStream fis = new FileInputStream(file);
int fileLength = (int)file.length();
photoStr = "insert into tab_photo(photo) values(?)";
statement = conn.prepareStatement(photoStr);
statement.setBinaryStream(1, fis, fileLength);
statement.executeUpdate();
statement.close();
fis.close();