error connecting Lazarus to Oracle XE lazarus / 16-Databases ---------------------------------------------------------------------- lawlerp · 2013-11-09 21:54 Hi I was wondering if somebody could help me with a problem I am having connecting Lazarus 1.0.12 to an Oracle 11g XE database. I am using Lazarus 1.0.12 Oracle XE Version 11.2.0 Windows XP (32 Bit) I have created a form on which I have dropped the following controls an OracleConnection a SQLTransaction a SQLQuery a datasource and  a DB Grid control OracleConnection properties set as follows DatabaseName = XE Hostname=localhost Username =  ituser Password = XXXXXX Once these properties were set I set the Connected property to True Next I set the SQLTransaction properties as follows Database=OracleConnection1 Active = True I noticed afterwards that the OracleConnection.Transaction property was set to SQLTransaction1 Next I set the SQLQuery1.Transaction property to SQLTransaction1. This had the effect of setting the SQLQuery1.database property to OracleConnection1.  When I tried to set the Active propert y to  True I get ora-1062: unable to allocate memory for the define buffer. Any help would be appreciated thanks ---------------------------------------------------------------------- Edson · 2013-11-10 03:12 Hi. I have experimented some similar. I have made a simple connection, like you described, and I can run it. But just a simple query of 300 records, make the project use more than 550Mb of RAM. Probably in your case, it doesn't have too much RAM avalaible. It seems that the Oracle connection, have a problem in Lazarus (at least on Windows). I haven't found a solution, until now. ---------------------------------------------------------------------- lawlerp · 2013-11-10 11:51 Quote from: lawlerp on November 09, 2013, 10:54:52 pmHi I was wondering if somebody could help me with a problem I am having connecting Lazarus 1.0.12 to an Oracle 11g XE database. I am using Lazarus 1.0.12 Oracle XE Version 11.2.0 Windows XP (32 Bit) I have created a form on which I have dropped the following controls an OracleConnection a SQLTransaction a SQLQuery a datasource and  a DB Grid control OracleConnection properties set as follows DatabaseName = XE Hostname=localhost Username =  ituser Password = XXXXXX Once these properties were set I set the Connected property to True Next I set the SQLTransaction properties as follows Database=OracleConnection1 Active = True I noticed afterwards that the OracleConnection.Transaction property was set to SQLTransaction1 Next I set the SQLQuery1.Transaction property to SQLTransaction1. This had the effect of setting the SQLQuery1.database property to OracleConnection1.  When I tried to set the Active propert y to  True I get ora-1062: unable to allocate memory for the define buffer. Any help would be appreciated thanks Replaced the OracleConnection with and ODBC connection. ODBC works fine. No errors.  I'd like to find a fix the OracleConnection problem though. I'd prefer use Oracle connection over ODBC - just a personal preference. ---------------------------------------------------------------------- Edson · 2013-11-10 16:16 I think the Lazarus Oracle client is some abandoned. I had this problem this since the 1.0.8 (In the 1.2RC1, I can't even  compile a simple test program). I've seen some people prefer using Zeos. But I haven't tested. Probably, it suits to your needs. IMHO, ODBC is not portable. It depend's on some personal configurations on the PC. Personally, I access to Oracle using the sqlplus, like a process, and controling his inputs/outputs. ---------------------------------------------------------------------- LacaK · 2013-11-10 17:34 It seems that similar problem "unable to allocate memory for the define buffer" is reported here: http://bugs.freepascal.org/view.php?id=24723 Can somebody prepare test application which will reproduce this error with TRUNK (2.7.1) version of FPC? or with 2.6.3 ? ---------------------------------------------------------------------- Edson · 2013-11-15 18:47 I have tested a simple connection in Lazarus 1.2RC1 (FPC 2.6.2): Code: [Select]procedure TForm1.FormCreate(Sender: TObject); begin   SQLquery1.DataBase := OracleConnection1;   SQLquery1.SQL.Text := 'select table_name from user_tables';   SQLquery1.Open;   SQLquery1.Last;   ShowMessage (intToStr(SQLquery1.RecordCount));   SQLquery1.First;   while not SQLquery1.EOF do   begin     ShowMessage(SQLquery1.FieldByName('table_name').AsString);     SQLquery1.Next;   end; end; And it use more than 800Mb of RAM in my PC. My user_tables, just have 350 records. So I think, the problem persists.