This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Help! VB.NET and OracleWhen I saved an image to Oracle BLOB field, I found the size of image was limited to 4000 bytes. I tested the same way using SQL, it was fine.
Does anybody know how to solve the problem? Thank you!
-freeofheart(如风如林);
2002-8-29
{198}
(#719989@0)
-
关于oracle的image大小的限制,我也不知道,不过假如你只想存储image而不在呼放在哪里的话,可以只将image的路径存进数据库,把图象以文件形式存起来就行了,这样就没有限制了
-booker(宇);
2002-8-29
(#720007@0)
-
Oracle本身BLOB的大小可以到4G,在VB6.0中也完全可以用APPENDCHUNK来实现,就是在VB.NET中图形大于4000字节时总是出错。目前我就是用存取路径的方法,但安全性与可维护性都不好。
-freeofheart(如风如林);
2002-8-30
(#720937@0)
-
I guess you didn't use AppendChunk in ADODefinitely you can save up to 4GB in an Oracle blob field. If you are using ADO, the reason you always get 4K in Oracle I think maybe you didn't use AppendChunk to save the image. With Oracle OLE-DB driver, you can only upload 4K chunk bytes to a blob field and you have to use a loop to store the image chunk by chunk. While with SQL Server OLE-DB driver, you don't have to worry about it, just store the image as a whole like you are dealing with normal field. Try it and good luck!
-freshair(Happy pig);
2002-8-30
{486}
(#721633@0)
-
是不是因为使用了OLE DB的原因?试着到微软网站download一个for oracle的基于.net平台的数据库driver
-miketany(MIKE老狼);
2002-8-30
(#722235@0)