Search code examples
delphidatasetbde

How do I solve the "Cannot perform this operation on a closed dataset" with Borland Database Engine and a Delphi application?


The application was working perfectly, until I edited the user database (*.dbf) in OpenOffice.org Calc. Now it gives me the above error about a closed dataset.


Solution

  • As per your own comment, you were unable to open the database file because it was corrupt. Thus, the error in your case meant not that you forgot to open it, but that your app cannot open the corrupt .dbf file.

    Other not-so-obvious reasons why you might get this error, than the obvious thing that you failed to set the table Active property to true, include system or BDE configuration errors (ODBC or ADO, or other BDE runtime files missing or not configured) that are required to open the file