stm是一个adodb.stream对象.
定义如下:
dim stm as new adodb.stream
我是用stream流的方法将图象存入数据库,想毕大家都知道.
我用下面方法可以将图片的stream流存入:
with rs
.addnew
.fields("xh")=trim(text1)
.fields("imaFile")=stm.read
.update
end with但是我想用insert的方法插入数据库,不知道用什么语法,我用了下面两个表达式都提示错误:
insert into test(xh,imaFile) values('" & trim(text1) & "','" & stm.read & "')"
insert into test(xh,imaFile) values('" & trim(text1) & "'," & stm.read &
")"一般字符串是用单引号,日期用#号,数字什么符号不用,那二进制流用什么呢?好像没有任何地方提到过这个问题!!!!!!!!
定义如下:
dim stm as new adodb.stream
我是用stream流的方法将图象存入数据库,想毕大家都知道.
我用下面方法可以将图片的stream流存入:
with rs
.addnew
.fields("xh")=trim(text1)
.fields("imaFile")=stm.read
.update
end with但是我想用insert的方法插入数据库,不知道用什么语法,我用了下面两个表达式都提示错误:
insert into test(xh,imaFile) values('" & trim(text1) & "','" & stm.read & "')"
insert into test(xh,imaFile) values('" & trim(text1) & "'," & stm.read &
")"一般字符串是用单引号,日期用#号,数字什么符号不用,那二进制流用什么呢?好像没有任何地方提到过这个问题!!!!!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货