bazzer747 25 Posted March 27, 2021 Hi, Whilst I've used Firedac for some while now I've never tried to use Interbase with it. My normal connectivity, both local and on remote servers, is using MSSQL. However, with some time on my hands I've decided to go through Cary Jensen's Delphi in Depth: FireDac book which uses Interbase throughout. But ... at the first hurdle I'm stopped. I've created a new VCL project with a data modele, and on it placed a FDConnection. In the parameters I've set it to a IB driver, pointed it to the EMPLOYEE.GDB, added User_Name and Password, and set Server to 127.0.0.1. When I Test this connection I get ..Unable to complete network request to host !localhost/305" ... target machine actively refused it. Googling this I've seen lots of different thoughts but few that pertain to Delphi 10.4.1/InterBase 2020 which I have installed or don't appear applicable. I've disabled my anti-virus products in case they were blocking this connection. Any suggestions would be appreciated - I'm not a Windows guru, which maybe is what is needed to allow this connection. Share this post Link to post
Attila Kovacs 629 Posted March 27, 2021 did you try with <yourip> instead of localhost? maybe it's not binding on lo by default? Share this post Link to post
Guest Posted March 27, 2021 (edited) 3 hours ago, bazzer747 said: Any suggestions would be appreciated - I'm not a Windows guru, which maybe is what is needed to allow this connection. hi @bazzer747 follow me: your Interbase Server is running ok? normally on PORT 3050 (normally released for use) if you not change on installation or by changes on setup file. for a Interbase Connection by FireDAC you needs just 3 components, basically - no talking about FDManager, FDTransactions and others not necessars at all FDGUIxWaitCursor -> FDPhysIBDriver FDConnection any other can be used in specific cases. ok? Protocol = TCP/IP Server - prefere use the "IP address" same in localhost Port - 3050 or any other used by IB Server and Login credencials, of course! out that, not it's really necessar config your Firewall or Antivirus, at general only in specific case, if your system take control of all, like a "environment paranoic" it's ready nothing more than this. on Client app, maybe be necessary config the Client Lib if it dont stay on same folder than your EXE take note: in VendorHome just put the path where the "DLL" is it. and VendorLIB = just lib name.dll when using Firebird, this 2 properties have a "particular bug", mainly, later first definition in DesignTime and Runtime type use> "...\ClientXXXlib.DLL" on VendorLIB, because the "VendorHome" stay like "xxxxPath\BIN" and "BIN part is repeated on VendorLIB" you see? hug Edited March 27, 2021 by Guest Share this post Link to post
bazzer747 25 Posted March 27, 2021 Hi, Yes, I have Interbase Server running - called developer_ib2020. And in the FDConnection it's almost exactly like yours: I did changed Protocol from 'local' to TCP/IP but made no difference (and Server from localhost to 127.0.0.1). On your last point - VendorHome and VendorLib properties, which DLL are you referring to? Share this post Link to post
Guest Posted March 27, 2021 (edited) 44 minutes ago, bazzer747 said: VendorHome and VendorLib properties, which DLL are you referring to? when deploys in your APP, some Database need deploys the xxClientLIB.DLL (MSWin)/.SO (linux), like "gds32.dll and interbase.msg for IB use" on Interbase, FBClient.dll on Firebird, etc... of course, when in PC Develpment this files is installed by default when installing Interbase, Firebird, MSSQL Server, etc... http://docwiki.embarcadero.com/InterBase/2020/en/Installation,_Registration,_and_Licensing_Information see on C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBase2020 look, if you dont inform the "PORT", then, the engine IB will go use the default = 3050 or any other in your environment defined. Por that is always good pratice - you define in your project, for avoid any other value. you see? good pratice: be on design o runtime (by code) always that possible, use TCP/IP protocol always that possible, use IP address (that way, avoid a "search by network... you see?" always that possible, use define the PORT etc... hug Edited March 27, 2021 by Guest Share this post Link to post
bazzer747 25 Posted March 27, 2021 So I am only in development on my PC, so when I installed Interbase I accepted all the defaults. This is why I'm a bit surprised that it doesn't work. It isn't that I'm doing anything complicated. Connecting to MSSQL is so simple and works seamlessly, I've had no issues at all. Yet, with Interbase I am getting issues all the time. No wonder I'm deciding not to use IB 🙂 What I have noticed, looking at Services, is the path to the executable is it points to the ..Program Files (x86)\Embarcadero\Studio\20.0\InterBase2020" -p developer_ib2020. So not the 21.0 directory (which is the 10.4 install). Could this be an issue? Also, in the Log On tab there's a checkbox 'Allow service to interact with desktop' which was unchecked. Checking it makes no difference. I'm thinking a good old uninstall/re-install to see if the previous installations have cross-contaminated each other ... Share this post Link to post
Hans J. Ellingsgaard 21 Posted March 27, 2021 Have you checked if your interbase service is running? You can try to connect to it with tke IB Consol that comes with the Interbase installation. Share this post Link to post
bazzer747 25 Posted March 27, 2021 Yes, the service is running. See snapshot above. Share this post Link to post
Guest Posted March 27, 2021 (edited) 34 minutes ago, bazzer747 said: I'm thinking a good old uninstall/re-install to see if the previous installations have cross-contaminated each other ... you can have how many instance of Interbase in same MSWindows you need (include distinct versions)... just, each one should use "one specific port" nothing more!!! of course, gds32.dll (normally used by all editions) always will be in "c:\windows\systemXX" folder, then, have it in your EXE folder to avoid have it in "..\systemXX" system folder there is not any complication in install or use Interbase, is quite simple than use a BDE in old time! Of course, having a "port confict" this is another history with any software. But, this is quite simple solve too! For easy way, just re-install the Interbase and pay attention on this part! WHAT PORT USE!!! or just change the "Service file" on MSWIndows ..\Drivers\Etc folder as above look at "interbase.log" on BIN IB folder for any error msg. hug Edited March 27, 2021 by Guest Share this post Link to post
Attila Kovacs 629 Posted March 27, 2021 netstat -anob >netstat.txt look for ibserver.exe on which interfaces and ports is listening Share this post Link to post
bazzer747 25 Posted March 28, 2021 Finally got it working. I think the problem was twofold - first I had IB Server 'developer_ib2020' running, and 'gds_db' wasn't running. I brought up IB Console and added 'gds_db' and created a new User. Then when I ran my application it connected successfully. So another case of the error message not giving a clue as to where the problem lay. It was really that I'd never used the 'gds_db' server before and therefore it wasn't configured correctly for use. Still not sure technically why it didn't connect to the 'developer_ib2020' instance that was running.. Now I'm connected I'll dig deeper and maybe start to understand the configuration aspects of these different server instances. Thanks all who responded to help me out. Really appreciated. Share this post Link to post
Guest Posted March 28, 2021 (edited) gds_db is a "alias" (nickname) default to IB port on installation, but you can: use any other than this nickname to port choiced. but really need always use a unique port, as in any other software in a universe of 1...64K you see? hug Edited March 28, 2021 by Guest Share this post Link to post