如何连接.mdf文件 [英] How to Connect .mdf file

查看:282
本文介绍了如何连接.mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我!
我有mydata.mdf和mydata_log.mdf,并且当我的PC没有sql server时我想连接到mydata.mdf,所以我该怎么做.请告诉我连接字符串

Please help me!
I have mydata.mdf and mydata_log.mdf and I want to connect to mydata.mdf when my pc don''t has sql server, so how to I can do this. Please tell me the connect string
Thanks very much!

推荐答案

首先,为什么不下载SQL Server?
在此处可用 [ ^ ]

此处 [
Firstly, why not just download SQL Server?
Available here[^]

Here[^] is a Stack O thread on the subject.


如果您愿意,唯一合理的方法是安装SQL Server Express版本.

您必须了解,当应用程序连接到数据库时,它连接到文件.它连接到负责处理文件的数据库引擎(SQL Server服务).任何应用程序或用户都永远都不会看到存储数据的文件,这取决于服务来处理它们.

例如,这与Access完全不同,Access只是一个共享文件,使用每个工作站中的相应驱动程序进行操作.
The only reasonable way is to install SQL Server, Express edition if you like.

You must understand that when an application connects to the database, it''s does not connect to the files. It connects to the database engine (SQL Server service) which is responsible of handling the files. No application or user should never see the files where the data is stored, it''s up to the service to take care of them.

This is very different from for example Access, which is simply a shared file manipulated with appropriate drivers from each workstation.


您可以使用SQLConnection将.mdf DataBase文件连接到应用程序.请参见:
connectionStrings
如果要在不安装SQLServer的情况下将应用程序与SQL数据库连接
然后只需安装对运行Sql Servises有用的必需文件.
You can connect your .mdf DataBase file using SQLConnection to application.See this :
connectionStrings
If you want to Connect your Application with SQL DataBase without installing SQLServer
then Just Install required files which are usefull to run Sql Servises.


这篇关于如何连接.mdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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