c# - C# 和 ado.net 应用程序中的可移植性问题

标签 c# ado.net

感谢所有花时间阅读此问题的成员。

我正在准备一个测验系统的应用程序,该系统将从数据库中随机抽取问题,并使用 ado.net 将它们放入界面(c#)中。

我的问题是我希望程序是可移植的,即你不必在我将运行我的代码的所有系统上完全安装sql服务器(如果我使用sql服务器驱动程序)。

这个问题有什么解决办法吗?

最佳答案

您可以选择Sql CE (紧凑)数据库。

来自Scott Guthrie的博客:

SQL CE does not require you to run a setup or install a database server in order to use it. You can simply copy the SQL CE binaries into the \bin directory of your ASP.NET application, and then your web application can use it as a database engine. No setup or extra security permissions are required for it to run. You do not need to have an administrator account on the machine. Just copy your web application onto any server and it will work. This is true even of medium-trust applications running in a web hosting environment.

关于c# - C# 和 ado.net 应用程序中的可移植性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7748515/

相关文章:

oracle - 如何获取 Oracle 用户有权访问的模式列表

c# - 用户注册时未设置 BirthDate 和 BirthDateRaw

c# - 在 MVC 操作中隐藏查询字符串

c# - DirectShow.Net播放带音​​频的视频

c# - TransactionScope 问题和 EF6 异步调用

oracle - DevArt 的 dotConnect for Oracle 与 DataDirect 的 ADO.NET 数据提供程序

c# - 重构一些遗留代码时出现问题

c# - 选择数据表的某些列

c# - 无法使用 Microsoft.Jet.OLEDB.4.0 提供程序正确读取 csv 文件

sql - 如何将 SQL 数据库中现有表中的行相乘?