how to connect to a firebird database in delphi 7 through a local network?

落花浮王杯 提交于 2019-12-23 05:28:07

问题


how do i connect my delphi 7 app to a local network? i am using zeos and have set up the ZConnection1 hostname setting to the ip of my server in the object inspector, i can connect on the computer i am coding right now but cant connect to the dabatase with another computer from the network. i have set the database path to C:\Documents and Settings\Administrator\My Documents\test.FDB. do i need to change it to an ip address? thanks

the components i used are

  • 1 zconnection
  • 1 ztable
  • 1 data source
  • 1 db grid

回答1:


try

ipserver:C:\Documents and Settings\Administrator\My Documents\test.FDB

where ipserver is the name or ip of your computer.




回答2:


As far as I can tell from the TZConnection class documentation, you need to set the properties HostName, Port (might be optional) and Database (only the database alias or full path, no hostname).




回答3:


@airoch 'the

thanks for the tip. got my app working two days ago just got some internet problem that why i havent posted.

i just changed the alias in aliases.conf and it worked! thanks to all the experts who gave time to my post!



来源:https://stackoverflow.com/questions/15865193/how-to-connect-to-a-firebird-database-in-delphi-7-through-a-local-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!