问题
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