如何从客户端连接存储在服务器上的数据库? [英] How to connect Database that stored on Server from Client?

查看:234
本文介绍了如何从客户端连接存储在服务器上的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个Vb.Net应用程序,它使用M. S. Access 2003数据库.目前,它可以在单台PC上完美运行.

我想转换说的应用程序.进入服务器-客户端应用程序.

我的基本问题是,我们该怎么做


任何人都可以为
指南(带有示例代码)
(1)与存储在服务器上的数据库的连接,
当前,我使用Data Source = | DataDirectory | Db.mdb
(2)Access数据库(如插入,更新和删除).
(3)获取数据(将服务器中的数据填充到Datagrid到客户端中)

抱歉,但我不了解如何编码.

谢谢

Hi,

I have One Vb.Net Application, It Use M. S. Access 2003 Database. Currently It Run Perfactly on Single PC.

I want to convert said app. into Server - Client Application.

My Basic Question is, How can we do Following


Can anyone Guide (With Example Code) for

(1) Connection to Database which is stored on server,
Currently I use Data Source=|DataDirectory|Db.mdb
(2) Access Database ( Like Insert, Update and Delete ).
(3) Fetching Data ( Fill Datagrid with data from Server into Client )

Sorry but I am not Understand How to Code.

Thanks

推荐答案

刚刚:
-将访问文件存储在网络共享中
-修改连接字符串以指向网络中的文件(可能使用UNC)

然后离开.程序(连接字符串除外)保持不变.

有关连接字符串,请参见: http://www.connectionstrings.com/access [ http://www.microsoft.com/sqlserver/zh-CN /us/editions/express.aspx [ ^ ]
Just:
- store the access file in a network share
- modify the connection string to point to the file in the network (possibly use UNC)

And off you go. The program (excluding the connection string) remains the same.

For the connection string, see: http://www.connectionstrings.com/access[^] /Network location)

Now, this isn''t going to be a client server program. It still is a program using a single shared file. If you really want to convert this to client server then I suggest that you move on to Sql Server instead of Access. You can download an Express edition for free: http://www.microsoft.com/sqlserver/en/us/editions/express.aspx[^]


这篇关于如何从客户端连接存储在服务器上的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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