服务器-客户端应用程序?

问题描述:



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

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

我的基本问题是,我们如何做到这一点. . . . ?

我试图从该网站上进行举报.
http://vb.net-informations.com/communications/vb.net_chat_server.htm

这是基本的聊天应用程序.我需要以下逻辑和一些基本的编码思想:-
我掌握了All Logic,但对vb.net套接字和访问权限还是陌生的
(客户端-服务器).

您可以为
指南(带有示例代码)吗? (1)连接,
(2)Access数据库(如插入,更新和删除).
(3)获取数据(将Server中的数据填充到Datagrid到Client中)

抱歉,但我不了解如何编码并再次询问.

谢谢

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 that . . . . ?

I tried to refrence from this website.
http://vb.net-informations.com/communications/vb.net_chat_server.htm

This is basic Chat App. I want logic and some basic coding idea for following :-
I got All Logic but I am New to Socket of vb.net and access
( Client - Server ).

Can you Guide (With Example Code) for
(1) Connection,
(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 and ask same again.

Thanks

步骤
步骤1)您需要将数据库托管在*服务器/位置,并允许客户端程序访问它.
第2步),您需要确保所有客户端都可以通过网络访问此位置.
步骤3)为此,您将需要在每个客户端上设置数据库连接,例如ODBC安装.
步骤4)您将需要在每个客户端上安装客户端程序(VB.Net程序).

在互联网上搜索.您应该能够找到大量有关此类设置的文章/示例/教程.
Steps
Step 1) You need to host the database in central server / location and allow client programs to access it.
Step 2) You will need to make sure all clients have network access to this location.
Step 3) To do this, you will need to setup a database connection, say an ODBC setup, on every client
Step 4) You will need to install the client program (VB.Net program) on every client.

Search on the internet. You should be able to locate a good number of articles / samples / tutorials on this type of setup.


要添加到Abhinav的答案中,因为这是一个Access项目,因此客户端需要具有直接访问的数据库文件.这意味着您很可能必须共享文件所在的文件夹.

为将来.如果您打算拥有更多的客户端,并且想要实现更安全和健壮的环境,我建议您看一下SQL Server Express Edition: ^ ].在这一点上迁移到SQL Server可能值得在将来花点时间.
To add to Abhinav''s answer, since this is an Access project, the client needs to have direct access to the database files. This means that you most likely have to share the folder where the files are located.

For the future. If you plan to have more clients and you want to achieve more secure and robust environment, I''d suggest that you would have a look at SQL Server Express Edition: http://www.microsoft.com/sqlserver/en/us/editions/express.aspx[^]. Migrating to SQL Server at this point could be well worth the time for the future.


Abhinav和Mika说的很好...

但是,您也可以尝试将Webservice refrance复制到客户端应用程序以与服务器进行通信..

1)该服务将能够执行服务器端数据库访问以执行数据库操作.
2)在您的服务器上安装或运行该Web服务.
3)在客户端计算机上,您只需要一个webrefrance即可访问该服务及其所需执行的方法


参考文献:-
1) http://msdn.microsoft.com/en-us/library/ms973829.aspx [ ^ ]
2)如何在桌面应用程序中使用Webservice. [ ^ ]
3) http://*.com/questions/621440/calling- asp-net-web-service-from-c-application [
What Abhinav and Mika says its good...

But you can try also a webservice refrance to your client side application to communicate with server..

1) That service will able to perform server side database access to perform your database operation.
2) Install or run that webservice over your server.
3) from the client computer you need only a webrefrance to access that service and its method for what you need to perform


References:-
1) http://msdn.microsoft.com/en-us/library/ms973829.aspx[^]
2) How to consume webservice in desktop application..?[^]
3) http://*.com/questions/621440/calling-asp-net-web-service-from-c-application[^]