访问App_Data文件夹中的.mdf文件 [英] Accessing .mdf file in App_Data folder

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

问题描述

嗨...

我已经将我的项目转换为C#,而不是使用php.如何以.mdf格式远程管理数据库以在智能设备应用程序中访问?香港专业教育学院尝试了多种方法,但没有运气...请帮助我...

connectionString =数据源=.\ SQLEXPRESS; AttachDbFilename = C:\ Inventory.mdf;集成安全性= True;用户实例= True" providerName ="System.Data.SqlClient";

Hi...

I''ve converting my project to C# rather than using php. How do i remote my database in .mdf format to be accessible in smart device application? Ive tried multiple way but no luck... Please help me...

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Inventory.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient";

推荐答案

使用AttachDbFilename = Inventory.mdf
确保ur数据库清单已附加在sql server中.如果存在
那么你只需要写数据库的名字就不需要写数据库的路径.

或者您可以像这样使用它.
< connectionstring> >
Use AttachDbFilename=Inventory.mdf
make sure that ur database Inventory is attached in sql server.If it exists
then u don''t need to write the path of database only name of database is enough.

Or u can use it like.
<connectionstring>>


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

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