+ -
当前位置:首页 → 问答吧 → 在VB程序里怎样传image类型数据到存储过程。

在VB程序里怎样传image类型数据到存储过程。

时间:2011-09-26

来源:互联网

CREATE Table T (f image not null)

CREATE PROCEDURE P(@p1 image) AS INSERT T VALUES (@p1)

在VB里怎样调用这个存储过程。

作者: yeah_yz   发布时间: 2011-09-26

以下代码未经测试,你试试看
'将CREATE PROCEDURE P(@p1 image) AS INSERT T VALUES (@p1)保存到数据库中,命名为Proc1

dim p as new adodb.stream
dim cmd as new adodb.command

cmd.commandtext="proc1"
set cmd.activateconnection=cnn'假设cnn连接已经正确打开

p.type=adTypeBinary
p.loadfromfile filename

cmd.parameters(0)=p.read

............

作者: worldy   发布时间: 2011-09-26

热门下载

更多