vba 如何从 MS Access 使用 SQLite 数据库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2513121/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use SQLite database from MS Access?
提问by Phong
I would like to use an SQLite database from Microsoft Access (access from- or transfer the contents to Microsoft Access).
我想使用 Microsoft Access 中的 SQLite 数据库(从 Microsoft Access 访问或将内容传输到 Microsoft Access)。
- How can this be done using VBA?
- 如何使用 VBA 完成此操作?
This is for a client who can not install extra software:
这适用于无法安装额外软件的客户:
- Does a library exist in VBA to use SQLite databases?
- VBA 中是否存在使用 SQLite 数据库的库?
采纳答案by Samuel Neff
If you can use the sqlite3.exe command line tool, then have VBA spawn that and dump the data to a csv file. Then Access can read both local data and the CSV file and copy appropriately.
如果您可以使用 sqlite3.exe 命令行工具,则让 VBA 生成该工具并将数据转储到 csv 文件。然后 Access 可以读取本地数据和 CSV 文件并进行适当的复制。
回答by HansUp
Does a standard library exist in VBA to used sqlite database?
VBA 中是否存在用于使用 sqlite 数据库的标准库?
No. Access and VBA do not have any native capability to connect to SQLite data sources.
不可以。Access 和 VBA 没有任何连接到 SQLite 数据源的本机功能。
You would have to install additional softwareto allow Access to use SQLite.
您必须安装其他软件才能允许 Access 使用 SQLite。
回答by Craig T
There are a number of solutions available which a simple Google search would reveal. Here is one: http://www.freevbcode.com/ShowCode.asp?ID=6893
有许多可用的解决方案,通过简单的谷歌搜索就会发现。这是一个:http: //www.freevbcode.com/ShowCode.asp?ID=6893