将SQL MDF文件放在何处 [英] Where to put an SQL MDF File

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

问题描述

我正在用C#构建一个使用MDF数据库文件的程序.鉴于Win Vista/7与Win XP有很大不同,在哪里放置db文件的最佳位置,以便该程序可以在Windows的任何版本上使用而不会出现权限问题?  我会做一个DBO文件更好吗?

I'm building a program in C# that uses an MDF db file.  Given that Win Vista/7 is much differrent from Win XP, where would be the best place to put the db file so the program can be used on either version of Windows without having permission problems?   Would I be better off doing a DBO file?

推荐答案

我会将其放在程序的执行目录中.这样,安装程序包可以毫无问题地写入文件.另外,它可以在任何Windows版本上使用.

I would place it in the executing directory with your program. That way the install package can write the file with no problems. Plus it will work on any version of Windows.


这篇关于将SQL MDF文件放在何处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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