如何从sql数据库中读取图像? [英] How read an image from sql database?
本文介绍了如何从sql数据库中读取图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以allah的名义
嗨所有
i想要从sql读/写图像视觉C ++和反向。
i使用visual C ++ 2012和sql 2012.
i知道使用CDatabase和CRecordset calsses但我不知道我怎么能使用那些读/写图像。
你可以帮我吗?
谢谢
in the name of allah
hi all
i want to read /write images from sql to visual C++ and reverse.
i work with visual C++ 2012 and sql 2012.
i know use the CDatabase and CRecordset calsses but i don't know how can i have to use those to read/write images.
can you help me?
thanks
推荐答案
就我而言知道有两种方法可以将图像存储到数据库中:您可以将图像文件内容存储为二进制对象(参见
- .wikipedia.org / wiki / Binary_large_object>维基百科的BLOB [ ^ ]。。
As far as I know there are two ways for storing images into a database: you might either
- store the image file content as a binary object (see BLOB at Wikipedia[^]).
- 将图像文件路径存储为字符串(有效地将图像文件本身存储在文件系统中)。
- store just the image file path as a string (effectively storing the image file itself in the filesystem).
这篇关于如何从sql数据库中读取图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文