c# - 如何在不安装 office 的情况下使用 access db

c# - How to use access db without installing office

我在 window 表单应用程序中使用 my_database.accdb 作为数据库...我想在我的客户端计算机上安装它而不安装 ms office.How 我可以实现 this.I在我的 C# 应用程序中使用 OleDb 作为连接器。

您不必在电脑上安装ms office,您只需安装Microsoft Access Database Engine。您可以从以下网址下载: Microsoft Access Database Engine

根据微软的说法:

This download will install a set of components that facilitate the transfer of data between existing Microsoft Office files such as Microsoft Office Access 2010 (*.mdb and .accdb) files and Microsoft Office Excel 2010 (.xls, *.xlsx, and *.xlsb) files to other data sources such as Microsoft SQL Server. Connectivity to existing text files is also supported. ODBC and OLEDB drivers are installed for application developers to use in developing their applications with connectivity to Office file formats.

The Access Database Engine 2010 Redistributable is not intended:

As a general replacement for Jet (If you need a general replacement for Jet you should use SQL Server Express Edition). As a replacement for the Jet OLEDB Provider in server-side applications. As a general word processing, spreadsheet or database management system -To be used as a way to create files. (You can use Microsoft Office or Office automation to create the files that Microsoft Office supports.) To be used by a system service or server-side program where the code will run under a system account, or will deal with multiple users identities concurrently, or is highly reentrant and expects stateless behavior. Examples would include a program that is run from task scheduler when no user is logged in, or a program called from server-side web application such as ASP.NET, or a distributed component running under COM+ services.