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

73,431

Solution 1

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

Solution 2

Error message says, that your dataset is not open. Seems you forgot to Open it or you Closed it somewhere.

Share:
73,431
Geoffrey
Author by

Geoffrey

Updated on July 22, 2020

Comments

  • Geoffrey
    Geoffrey almost 4 years

    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.

  • Cosmin Prund
    Cosmin Prund almost 13 years
    Apparently the OP is doing it's stuff from the BDE Administrator control panel applet: no dataset Opened or Closed, no Object Inspector.
  • Johan
    Johan almost 13 years
    @Cosmin, I know I'm just suggesting changing the app so the OP can see errors, or have them written to a log so the error message does not get hidden.
  • Ken White
    Ken White almost 13 years
    @Johan: How exactly do you change the code to the BDE Administrator, which was written by Borland a decade or more ago and shipped as a binary (executable) file?
  • Johan
    Johan almost 13 years
    @Ken, not in the BDE, in the Delphi application, The OP told us he wrote a Delphi application.