且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在SQL Server2005中创建MDB文件

更新时间:2023-02-06 12:57:23


您的问题不太清楚.
我们需要一次又一次地创建数据库吗?如果您在网络中,只需设置数据库连接字符串.如果您不在网络中,则将该系统的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