从数据库绑定到fileupload获取字节数组 [英] get bytes array from database bind to fileupload
本文介绍了从数据库绑定到fileupload获取字节数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Iam将fileupload图像转换为字节并以Blob数据类型保存到oracledatabase
我使用以下代码
Byte [] imgByte = null;
HttpPostedFile文件;
Iam converting fileupload image as bytes and saved to oracledatabase as Blob datatype
I used Following code
Byte[] imgByte = null;
HttpPostedFile File;
File = FileUpload_choice1.PostedFile;
imgByte = new Byte[File.ContentLength];
File.InputStream.Read(imgByte, 0, File.ContentLength);
QB.QUESTION_CHOICE1_IMG = imgByte;
成功保存到blob
但是现在我检索blob数据并绑定到fileupload
如何将blob转换为字节数组
如何将字节数组显示为fileupload
任何建议
It successfully saved into blob
But now i retrieve blob data and bind to fileupload
how can i convert blob to bytes array
How can i show bytes array to fileupload
Any suggestions
推荐答案
参考
使用ASP在SQL Server 2000和2005中将对象存储和检索为BLOB .NET 2.0 [ ^ ]
使用二进制大对象-bbbs / [ ^ ]
这篇关于从数据库绑定到fileupload获取字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文