Click here to Skip to main content
15,906,341 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I insert blob data to DBB2 using store procedure in .net?

When I insert blob data by sql string =
SQL
INSERT INTO tblDemo(IDFile,Content) values(?,?)

and add DB2Parameters for DB2Command ==> Run ok

Then I write a store procedure to insert into tblDemo

SQL
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?
Posted
Updated 17-Jul-11 18:03pm
v2

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.
 
Share this answer
 
v2
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?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900