如何将二进制数据(例如照片,视频,歌曲等)存储和检索到数据库中 [英] How to store and retreive binary data into database like photos, videos, songs etc
本文介绍了如何将二进制数据(例如照片,视频,歌曲等)存储和检索到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的Web表单上共享照片,歌曲和视频,并将其以二进制格式存储到数据库中.请帮助我....
I want to share photos, songs and videos on my webform and store it into database in binary format. plz help me....
推荐答案
请点击链接
http://www.codeproject.com/Articles/15460/C-Image-to-Byte-Array-and-Byte-Array-to-Image-Conv
谢谢
Please follow the link
http://www.codeproject.com/Articles/15460/C-Image-to-Byte-Array-and-Byte-Array-to-Image-Conv
Thanks
,您应该将它们转换为byte []格式,并且存储该值的列应将类型声明为"image".因此,您可以轻松地做到这一点.
you should convert them byte[] format,and the column which stores the value should declare type as "image".So u can easily do this.
这篇关于如何将二进制数据(例如照片,视频,歌曲等)存储和检索到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文