mysql数据库
表名:mat_picture
字段:matno varchar
picture longblob
程序如下:
conn = Database.createOAConnect();
sql = "insert into mat_picture(matno,picture) values(?,?)";
pstm = conn.prepareStatement(sql);
//插入料号
pstm.setString(1, matno);
is = new FileInputStream(new File(filename));
//插入图片
pstm.setBinaryStream(2,is,is.available());
pstm.executeUpdate();
(其中filename为存图片的物理地址)
但是报这个错误,不知道怎么解决:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{?R_???s?O??{?=????z?s?w?~wkf??>??,?g6??÷±n×??ü?·z??N–???c_?(N????ú{}???lt··' at line 1
表名:mat_picture
字段:matno varchar
picture longblob
程序如下:
conn = Database.createOAConnect();
sql = "insert into mat_picture(matno,picture) values(?,?)";
pstm = conn.prepareStatement(sql);
//插入料号
pstm.setString(1, matno);
is = new FileInputStream(new File(filename));
//插入图片
pstm.setBinaryStream(2,is,is.available());
pstm.executeUpdate();
(其中filename为存图片的物理地址)
但是报这个错误,不知道怎么解决:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{?R_???s?O??{?=????z?s?w?~wkf??>??,?g6??÷±n×??ü?·z??N–???c_?(N????ú{}???lt··' at line 1
解决方案 »
- 安装mysql-connector-net提示错误!求解释
- Mysql 日期型,索引查询的问题
- 一个复杂SQL查询语句,冰天雪地跪求解答
- Mysql取24小时之内的记录怎么写?函数怎么不能用?请高手指点
- linux as4 +php5.2.0+mysql5.0.27 phpinfo未显示mysql信息
- 关于MYSQLCLIENT与GLIBC_2.4的依赖问题(使用MYSQL C API)
- 急问:一个 三表联合查询的问题(mysql)
- mysql有没有自动运行功能?
- 如何将MySQL数据库转化成Ldap或者Txt格式的文件?
- mysql新手求助,怎么在一个字段里存多个字符串?怎么让字段数量动态增加?
- 字段排序问题
- 请教合理的数据库设计 消息系统的表结构
First chance exception at $7C812AEB. Exception class EMyError with message '
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S蝳绯?D\\茄LA&蚖彎????獃糣S榕mX藟 U愊 諹x詶#u裭to9tHs湒楈X黩囦?g纽' at line 3'. Process TestPIC.exe (680)