开发者

How to connect to a MS Access database over LAN using Delphi?

I am writing an application that extract开发者_JAVA技巧s data from a file and then saves the data in a MS Access database. I now want to write a client for this program where users can view the data with a nice GUI. How do I connect the client on another PC to the database on my PC using Delphi? For starters I would just like to display the MS Access Data in a DB Grid. I have never worked with networking before in Delphi.


There are lots of ways to do this. One simple way is just to set up an ODBC connection to the database (using ODBC administrator). It doesn't matter if this database is over the network - just map a drive or use a fully qualified name.

You then have a choice of components you can use to connect to the database. ADO is a good choice for Access. For starters try using a TADOQuery, TDataSource and data aware component such as a TDBGrid. There is plenty of documentation on how to uses these in the delphi help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜