Problems connecting to firebird... lazarus / 16-Databases ---------------------------------------------------------------------- jluix · 2007-04-11 15:34 Hi! Two  weeks ago I started a thread about this issue but I had to stop that. Now I want to resume it. I work with ubuntu feisty fawn and I've installed firebird CS v.2. I can manage databases with isql as root and as another users (so I think isn't a problem of privileges) in this way: isql /prueba.fdb user "sysdba" password "mypass" but, when I try: isql localhost:/prueba.fdb user "sysdba" password "mypass" I get the error: Statement failed, SQLCODE = -902 Unable to complete network request to host "jluix-desktop". -Failed to establish a connection. -Connection refused The relation of this issue with Lazarus is that with ibconnection or another control to access my firebird database, I have to link it through a server (like localhost), and I get the same error that with isql. I ping localhost and it works right. I've read http://www.firebirdsql.org/index.php?op=doc&sub=contrib&id=c onnect_to_linux but I don't think that is the problem. I have the line gds_db 3050/tcp in /etc/services. I have a file called firebird in /etc/xinetd.d with the lines: # default: on # description: FirebirdSQL server # # Be careful when commenting out entries in this file. Active key entry should # be the first as some scripts (CSchangeRunUser.sh in particular) use sed # scripting to modify it. service gds_db {    disable = no    flags      = REUSE    socket_type   = stream    wait      = no    user         = firebird # These lines cause problems with Windows XP SP2 clients # using default firewall configuration (SF#1065511) #   log_on_success   += USERID #   log_on_failure   += USERID    server      = /opt/firebird/bin/fb_inet_server } Could you help me? Thanks. ---------------------------------------------------------------------- jluix · 2007-04-11 17:33 well... I've just tried with firebird superserver version and now I can access through localhost to my databases via isql, so I'm testing the connection with tibconnection. When I try it (putting the username (sysdba), password, dialect (=3), hostname (localhost) and databeasename and then connected(=true)), I haven't any error   . Then I link that control with a TSQLTransaction (database  (=ibconnection1) and Active(=true)) and I haven't any error   . But, when I link that with a TSQLQuery control I get: IBConnection1: FreeStatement -invalid statement handle Anybody knows what's wrong? Thanks. ---------------------------------------------------------------------- emaza · 2008-02-22 00:20 Hi I don't have an answer  -I have the same problem. If you found a solution on your own, please post it. It seems there is litlte help for Lazarus beginers.. Your post is almost one year old ---------------------------------------------------------------------- researcher · 2009-05-22 22:31 not sure, had a similar issue - isql worked, but not lazarus, try a gbak and restore with your regular username that helped connect to my database with the lazarus app ---------------------------------------------------------------------- clauslack · 2009-06-05 14:27 For IBConnection1: FreeStatement -invalid statement handle This happens when the SQLQuery.sql is empty, was open without a query. Here is a simple example (you can add try/except) Code: [Select]    if not IBConnection1.Connected then IBConnection1.Open;     if SQLTransaction1.Active then SQLTransaction1.Commit;     SQLQuery1.close;     SQLQuery1.SQL.clear;     SQLQuery1.SQL.Add('select * from factc');     SQLTransaction1.StartTransaction;     SQLQuery1.open; ---------------------------------------------------------------------- Loesje · 2009-06-07 13:34 Can you create a bug-report for this?