如何在SQL Server2005中创建MDB文件 [英] How to creat a mdb file in Sql Server2005

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

问题描述



我正在ASP.NET上创建一个网站,并且我想使用数据库文件.因此,无论在哪个系统上为该项目工作,我都应该轻松访问数据库,而无需一次又一次地创建它.

Hi,

I am creating a website on ASP.NET and I want to use the database file. So that on which ever system I work for that project I should easily access the databasew without creating it again and again.

Is it possible that I can have a db file through which I can access my whole database having the tables which are required in the project?

推荐答案


您的问题不太清楚.
我们需要一次又一次地创建数据库吗?如果您在网络中,只需设置数据库连接字符串.如果您不在网络中,则将该系统的mdf和数据库日志文件复制到当前位置并设置路径.
祝一切顺利.
--AK
Hi,
Your question is not so clear.
Do we need to create database again and again? If you are in network just set the database connection string. And if you are not in a network then copy the mdf and database log file from that system to current location and set the path..

All the best.
--AK


我真的不明白,你的问题可能是什么.

如果您的哪个"系统位于Intranet中,则只需要通过tcp/ip发布sql服务器即可.这是商业版本的默认设置.如果您有Express Edition,则需要启用tcp/ip绑定.您只需要使用正确的连接字符串即可.如果您的Visual Studio Express版本没有服务器资源管理器,只有数据库资源管理器,则您将无法从Visual Studio中访问服务器,但是您的应用程序将能够正常工作.

顺便说一句,您不需要重新创建数据库结构.制作一个干净的备份版本,然后可以根据需要在不同的服务器上进行还原.
I don''t really see, what your problem could be.

If your "which ever" systems are in an intranet, you just have to have the sql server published via tcp/ip. This is default for commercial editions. If you have express edition you need to enable tcp/ip binding. You just have to use the proper connection string. If your Visual Studio Express edition has no Server explorer, only Database Explorer, you will not be able to access the server from within Visual Studio, but your application will be able to work correctly.

By the way, you don''t need to recreate the database structure. Make a backup form a clean version, and you can restore on different servers, if you need.


让我们采取不同的态度,为什么不能使用中央SQL Server数据库?

如果地理位置/连接性是一个问题,那么您可以使用创建MDB文件并将其复制到您工作所在的所有系统上,但是我不赞成这样做,因为-
-您不会在所有系统之间保持数据同步.
-MDB文件仅支持OleDB连接,因此您将无法使用SQLClient.

对于一次活动,如果您已经在SQLServer中拥有数据库,则可以使用SQLServer导出向导将数据库转换为MSAccess(MDB)文件.

让我们提出详细的问题和您的疑虑.

谢谢
Rushikesh Joshi
Let we take it differently, why you can''t use a central SQL Server database?

If geo location/connectivity is an issue, then you can use create an MDB file and copy it on all system from where you are working but I am not in favor of this because -
- You will not keep data synch between all system.
- MDB files only supports OleDB connections so you will not able to consume SQLClient.

For one time activity, if you already have database in SQLServer then you can make use of SQLServer Export wizard to convert Database into MSAccess (MDB) file.

Let''s come-up with detailed question and your concerns.

Thank You
Rushikesh Joshi


这篇关于如何在SQL Server2005中创建MDB文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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