how do i connect to a firebird database on delphi 7 from multiple clients spread across the internet?

风格不统一 提交于 2019-12-06 02:08:34

There are some libraries available - see here for a rather comprehensive list.

For the libraries which support more database back-end you must choose the Firebird driver (usually is called Interbase/Firebird Driver or IB/FB Driver).

For protocol, choose TCP/IP - for connection string you must have your server public IP address : your full database file path as seen by FB server.

The exact format depends of library but, for example, if your server is example.com then the connection string would be example.com:c:\myDatabases\myDatabaseFile.FDB

However, this setup isn't advisable because of security (and perhaps speed) issues which arise having a Firebird database directly exposed to the Internet.

Much more advisable is to have an 3-Tier (n-Tier) application in which the middle tier will be responsible to be a secure "firewall" between the server and your clients.

You can implement TCP/IP packets encryption/decryption directly in the firebird engine itself. Personnaly, i have downloaded the Firebird 2.5 source code and injected secure tunnelization code directly in his low level communication layer (the INET socket layer). Now, encryption/decryption is done directly by the firebird engine for each TCP/IP packet both at the server side and the client side (fbclient.dll). Then there is no need to re-structure the client application except adding one line of code that provide the secret key you choose to crypt communication to the fbclient.dll. The same secret key must be declared in the firebird.conf file of your server installation. I have also implemented a proxy negociation solution in the fbclient.dll in order to allow to TCP/IP packets to pass throught any proxy server (like Microsoft ISA Server for example). For us, this architecture is functional for more than one year in a real production system.

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