如何使用.net中的存储过程将Blob数据插入DBB2? [英] How can I insert blob data to DBB2 using store procedure in .net?

查看:83
本文介绍了如何使用.net中的存储过程将Blob数据插入DBB2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用.net中的存储过程将Blob数据插入DBB2?

当我通过SQL字符串=插入Blob数据时

 插入  INTO  tblDemo(IDFile,Content) 创建 >过程 sp_ADD(v_IDFile GRAPHIC(语言 SQL 插入 插入 tblDemo(IDFile,Content)(v_IDFile ,v_Content);  END  



并运行DB2Command

ERROR [57011] [IBM][DB2/NT] SQL0930N There is not enough storage available to process the statement. SQLSTATE=57011



我该怎么做呢? Db2中BLOB的默认大小是(我认为)1 MB.


我的blob列的大小最大(2146435072),并且插入数据库的文件大小是314Kb.

如果是问题大小,则使用存储过程还是不存储过程有问题?


How can I insert blob data to DBB2 using store procedure in .net?

When I insert blob data by sql string =

INSERT INTO tblDemo(IDFile,Content) values(?,?)


and add DB2Parameters for DB2Command ==> Run ok

Then I write a store procedure to insert into tblDemo

CREATE PROCEDURE sp_ADD(v_IDFile GRAPHIC(10), v_Content BLOB(2047M)) LANGUAGE SQL BEGIN insert into tblDemo(IDFile, Content) values(v_IDFile , v_Content); END



and run DB2Command

ERROR [57011] [IBM][DB2/NT] SQL0930N There is not enough storage available to process the statement. SQLSTATE=57011



How can I do that?

解决方案

Make sure the size of the column is more than the size of the data you are trying to insert into it.
The default size for a BLOB in Db2 is (I think) 1 MB.


Size of my blob column is maximum(2146435072) and size of file insert to database is 314Kb.

If the problem size, use the store procedure or not store procedure are faulty?


这篇关于如何使用.net中的存储过程将Blob数据插入DBB2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆