如何使用visual studio项目将pdf文件上传到ms访问数据库 [英] How do I upload pdf file into ms access database using visual studio project

查看:119
本文介绍了如何使用visual studio项目将pdf文件上传到ms访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从vb studio 2010表格上传pdf到ms访问数据库?



我尝试过:



如果有可能如何处理它?<​​br />


如何添加pdf文件?

is it possible to upload pdf into ms access database from vb studio 2010 form?

What I have tried:

if it is possible how to deal with it ?

how to add the pdf file?

推荐答案

这是可能的。您必须使用 LongVarBinary 将字段声明为BLOB(二进制大对象)。



参见如何:使用ADO.NET和Visual Basic .NET从BLOB列读取和写入文件 [ ^ ]用于访问这些字段。



但请注意,出于性能原因,不建议在数据库中保存大量二进制数据。当只有一个客户端访问Access文件时,它可能会将这些文件存储在文件系统中,而只存储数据库中的路径。
It is possible. You have to declare a field as BLOB (Binary Large OBject) using LongVarBinary.

See HOW TO: Read and Write a File to and from a BLOB Column by Using ADO.NET and Visual Basic .NET[^] for accessing such fields.

But note that saving large amounts of binary data in databases is not recommended for performance reasons. When there is only one client accessing the Access file it might store such files in the file system instead and store only the path in the database.


这篇关于如何使用visual studio项目将pdf文件上传到ms访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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