如何在visual studio项目中嵌入sql express。 [英] How do I embed sql express in visual studio project.

查看:240
本文介绍了如何在visual studio项目中嵌入sql express。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有视觉工作室项目。我想将myproject.mdf文件嵌入到项目中。

我在我的数据库中创建表以进行开发。在我完成后如何准备包含sql东西的安装项目?

如何处理一个带数据库的项目?



例如,这个应用程序将安装本地用户计算机。



有4个表,表保存日志。



当用户安装此软件时,他可以轻松保存日志。我该如何处理项目的数据库部分?你能给我一个先决条件吗?

I have visual studio project. I want to embed myproject.mdf file in to project.
I create tables in my database for development. After I finishe how can ı prepare setup project which include sql stuff?
How can I handle one project with database ?

Forexample , This aplication will installend local user computer.

there is 4 table , table keeps logs.

When user install this software , he can easly save logs. How can I handle database part of project? Can you give me a prerequisites?

推荐答案

如果需要在本地使用数据库,我建议使用 SqLite [ ^ ]或 MS Access [ ^ ]数据库。



如果必须在局域网中的用户之间共享数据库,则需要选择一台计算机作为服务器。在此计算机上安装SQL Server Express并启用命名管道或IP连接 [< a href =https://www.blackbaud.com/files/support/infinityinstaller/content/installermaster/tkenablenamedpipesandtcpipconnections.htmtarget =_ blanktitle =New Window> ^ ]能够将客户连接到'集中'数据库。





如需了解更多信息,请参阅:

配置服务器以监听备用管道(SQL Server配置管理器) [ ^ ]

配置服务器以侦听特定TCP端口(SQL Server配置管理器) [ ^ ]

为数据库引擎访问配置Windows防火墙 [ ^ ]



ADO.NET数据提供者 [ ^ ]

SQLite内部 [ ^ ]

SQLite的ADO.NET提供程序支持ADO.NET实体框架! [ ^ ]

从.NET应用程序访问Microsoft Office数据 [ ^ ]

如何:连接到Access数据库中的数据 [ ^ ]
If there is a need to use database locally, i'd suggest to use SqLite[^] or MS Access[^] database.

If the database have to be shared between users in local area network, you need to choose one computer as a server. Install SQL Server Express on this computer and enable named pipes or ip connections[^] to be able to connect client to the 'centralized' database.


For further information, please see:
Configure a Server to Listen on an Alternate Pipe (SQL Server Configuration Manager)[^]
Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)[^]
Configure a Windows Firewall for Database Engine Access[^]

ADO.NET Data Providers[^]
Inside SQLite[^]
SQLite's ADO.NET Provider Supports the ADO.NET Entity Framework![^]
Accessing Microsoft Office Data from .NET Applications[^]
How to: Connect to Data in an Access Database[^]


这篇关于如何在visual studio项目中嵌入sql express。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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