2
votes

When I run the program which is connect to a paradox database (*.db), it show error message something like project myprogram.exe raised exception class EDBEngineError with message Insufficient memory for this operation.

I use the DataSource1, Table1 and Query1 control and show the result of the Query1 to DBGrid1, the record is not greater than 100 record and the field is about 6 fields and only 1 table in the database. But the Query1 RequestLive property set to True.

I've search the web for the resolution and it shows that I need to setting the BDE administrator INIT tab to increase the ShareMemory, et al. Is it normal for me to set or maybe something wrong with the initialization of the BDE controls?

Thanks.

3
try onclose may be somehting like FreeAndNil(Query1);..free then tables and query components nad disconnect from the databasePresleyDias
First, do what the suggestions you found tell you do to. Come back if that doesn't work. FWIW, "Insufficient memory for this operation" is often a resources issue, not actual memory.mj2008
I had the same issue few months ago, Adam post about SHAREDMEMSIZE did the trick for me.Cesar Romero

3 Answers

3
votes

Yes, you should increase this SHAREDMEMSIZE parameter to make it work as described here. If this is a new project, i would not recommend using paradox database. There are plenty of free databases like Firebird, Microsoft SQL Server Express, Mysql...

2
votes

This unit is a patch for the famous 4Gb BDE Bug. It is build to fix the 'Insufficient disk space'-error which can occur while using BDE when the disk free space is near to a multiple of 4Gb. For more information please see BDE report# 7089 on Quality Central. The reason for the error in BDE is aparently a bug in idapi32.dll while computing free disk space. Idapi32.dll is using the api function called GetDiskFreeSpaceA exported by kernel32.dll. The solution is to 'patch' GetDiskFreeSpaceA in kernel32.dll for the current process, every call to this function is redirected to a new routine (NewGetDiskFreeSpaceA).

The source code of the patch is included. If you use another programming language (i.e. not Delphi), a precompiled DLL (FIX4GBug.dll) is also included. (If you can compile the included unit, then you do not need to distribute the DLL) --- fixes it forever

1
votes

This may be a disk space issue (even if you have loads of free disk space). as far as I can tell, BDE/Paradox checks available disk space using an older Windows(32 bit?) interface. When the free space query returns a value like xxxxxxxx 00000yyy, the value is treated as 'yyy' and considered too small. Critical point appears to be when the free space is close to a multiple of 2Gb. Try removing or creating a large file.