"Insufficient Memory" when running query in Delphi 7 using BDE Paradox 7

14,699

Solution 1

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...

Solution 2

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

Solution 3

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.

Share:
14,699
user1210396
Author by

user1210396

Updated on June 05, 2022

Comments

  • user1210396
    user1210396 almost 2 years

    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.