[SOLVED] FPC 2.6.0 + Lazarus SVN (37857) + ZEOS SVN (firebird) = error lazarus / 16-Databases ---------------------------------------------------------------------- marduk · 2012-07-04 08:08 Hi, I have problem with above configuration when database connection is loaded from ini. With "older" fpc, lazarus and zeos everything worked well. In ZConnection was Connected property set as False and Database, Port, Hostname, User, Password, ... were empty. When app starts (OnCreate), it loads configuration from ini, sets components properties and then connect to database. But now I must set values in designtime, otherwise it crashes with "Error Code: -904. Unsuccessful execution caused by an unavailable resource." I don't know if the problem is in lazarus or zeos library. It seems, that lazarus initialize components in other way now. Thank you for help. Marduk ---------------------------------------------------------------------- ludob · 2012-07-04 09:11 That is an error code from firebird. Can you show us the code that opens the connection in the OnCreate? Are the data in the ini file correct? The error could be caused by a wrong database name. ---------------------------------------------------------------------- marduk · 2012-07-04 09:42 Yes, the error is from firebird. But in time, when the connection is not required. I tried debbug it and the connection is called before OnCreate. Steps are those: - in lazarus is Connected se to false - run application - application starting - trying to connect to database (why?) - when property not set, then error - this is before call OnCreate - call OnCreate and read right parameters from ini - connect to database - application running It seems, that when component is initialized, created is tries to connect to db even in property connection is set to false. ---------------------------------------------------------------------- ludob · 2012-07-04 09:46 Are you using any dblookup controls?  They are trying to open the listsource when loading. Setting listsource at run time solves that problem. ---------------------------------------------------------------------- BigChimp · 2012-07-04 10:03 Perhaps ludob is being to modest again... have a look here on the details: http://lazarus.freepascal.org/index.php/topic,17355.msg96118.html#msg9 6118 A fix for this was committed yesterday, in Lazarus revision 37861, which might solve this. ---------------------------------------------------------------------- marduk · 2012-07-04 10:38 Thanks, BigChimp. Problem solved. After update from SVN, everything OK.