如何使用c ++中的ado将文件保存到sql server数据库中? [英] How does one save a file into an sql server database using ado in c++?

查看:93
本文介绍了如何使用c ++中的ado将文件保存到sql server数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c ++中的ado将文件保存到sql server数据库?

解决方案

正如Peter提到的那样,正确的方法是将文件保存在db中,但要将文件复制并存储在数据库服务器上的某个位置,只保存文件的路径。



这样可以确保数据库不会被污染而且你有良好的访问时间不仅适用于数据库,也适用于文件。另一个有问题的szenario是db的备份。



想象它就像一个 DMS

How does one save a file into an sql server database using ado in c++?

解决方案

As Peter mentioned the right way isnt to save the file in the db, but to copy and store the file somewhere on your db server and only save the path to the file.

This ensures that the db will not get bloted and you have good access times not only for the db but for the files. Another problematic szenario is backup for the db.

Think of it like a DMS


这篇关于如何使用c ++中的ado将文件保存到sql server数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆