没有安装Access的c#.net MS Access数据库 [英] c#.net MS Access database without Access installed

查看:51
本文介绍了没有安装Access的c#.net MS Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能吗?

我尝试过Google,但是我必须搜索错误的关键字并且没有得到答案.

I've tried Google, but I must be searching the wrong key words and not getting an answer.

我有一个小型应用程序,只有2-3个人想要将数据存储在数据库中.我无法安装任何SQL Server,因此我认为访问权限是最佳选择.

I have a small application only being used by 2-3 people that I want to store data in a database for. I can't install any SQL servers so I thought access would be the best option.

将要使用的计算机也未安装Access.

The computers it will be used on don't have Access installed either.

我正在使用VS2012 Express .net4.0

I'm using VS2012 Express .net4.0

推荐答案

基本上,您所需要做的就是使用正确的提供程序指向访问db的连接字符串.这可能对您有用,只需将数据库位置更改为2-3台计算机可以访问的共享位置:

Basically all you need is the connection string pointing to the access db with the right provider. Here's one that might work for you, just change the DB location to a shared place that the 2-3 computers can access:

var connection = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\BC207\test.accdb")

这篇关于没有安装Access的c#.net MS Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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