Connecting from Lazarus to remote Firebird on Linux via SSH lazarus / 16-Databases ---------------------------------------------------------------------- PeterG · 2012-03-28 08:23 I am trying to get any kind of DB-connection component to connect from Lazarus running on Windows 64 to Firebird Superserver 2.1 running on Ubuntu via ssh. And I'm not exactly having a lot of luck with it. I am creating a tunnel to the Ubuntu server using Putty and forwarding port 3050 to my local Windows machine. I can connect to the database using FlameRobin, by just connecting to localhost, which is how it's supposed to work, so there is communication through to the db. But when I try using a TIBConnection in Lazarus, I set the HostName to "localhost" and use the same alias for the db that I use in FlameRobin as the DatabaseName, when I change "connected" to "true", I get an error message box saying "Control-C hit", and Lazarus freezes and has to be restarted. Using the full path to the db doesn't change anything. Incidentally I can't get it to work in Delphi XE either. Has anybody tried anything like this, who can offer any clues to what can be wrong? ---------------------------------------------------------------------- BigChimp · 2012-03-28 08:38 Seems like you are doing the right thing. You're probably running Lazarus 64 bit with FPC 64 bit? Try using the 32 bit versions. That "Control-C hit" error seems to occur on Win64 with Firebird (see bugtracker). Also, you might want to change 'localhost' to '127.0.0.1'. Don't know if name resolution is involved, and can't remember whether there were different Firebird protocols (XNET, whatever) depending on what you specified)... easiest just to try But it is worrying that you can't get it to work in Delphi XE. I'd check your dll versions as well. Do you have the firebird fbclient.dll in your system directory or in your project/Lazarus directory? Are they the same version as the one Flamerobin uses (IIRC, Flamerobin can use dlls in its own directory, as well). I'd also test using Firebird's isql.exe (the same version as your dlls), in your project path. This will help determine that the connection using those dlls actually works. Good luck! ---------------------------------------------------------------------- PeterG · 2012-03-29 08:07 Yeah - it seems to be some kind of 32-bit/64-bit problem. If I install the 32-bit version of Lazarus on my 64-bit Windows everything works they way it's supposed to. Haven't had time to investigate what the problem is with Delphi XE - I'm much more keen to use Lazarus anyway. ---------------------------------------------------------------------- count · 2012-03-29 21:33 I bet you have no x64 fbclient installed With lazarus 64 you shall use all libraries x64. So gds32.dll or fbclient.dll must be compilled for x64 architecture. I've tested it with UIB components on my x64 and everything was pretty nice. ---------------------------------------------------------------------- BigChimp · 2012-03-30 19:49 Count is right: FPC and Firebird library bitness need to match.