Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7812633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:34:31+00:00 2026-06-02T04:34:31+00:00

I’m creating an application that requires me to post a lot of data into

  • 0

I’m creating an application that requires me to post a lot of data into tables as well as changing values within the table.

Whenever I write applications most of my time seems to be stopping errors such as:

‘Cannot perform this method on a closed dataset’`

or

‘tblName not in edit or insert mode’`

I seemingly get these every time and they aren’t easy to debug and find out what’s going wrong where.

I’m just looking for some guidance on how I can stop this from happening, I know it’s something I am doing. For example, at the moment I am getting:

‘Cannot perform this operation on a closed dataset’

somewhere within this code:

procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  if not tblSystem.Active then
    tblSystem.Open;

  if not tblSpecs.Active then
    tblSpecs.Open;

  tblSpecs.Edit;
  tblSpecs.Post;
  tblSpecs.Close;

  // Post changes to the notes on exit
  tblSystem.Edit;
  tblsystem.Post;
  tblSystem.Close;
end;

and

procedure TfrmMain.chkAutoUpdateClick(Sender: TObject);
begin
  tblSystem.Edit;
  if chkAutoUpdate.Checked then
    chkInstUpdates.Enabled := True
  else
  begin
    chkInstUpdates.Enabled := False;
    tblSystemAutoUpdate.AsBoolean := False;
  end;
end;

I’m going to assume right away that this is bad code for pushing/pulling data from a table, any help would be appreciated. Also any debugging help would be amazing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:34:36+00:00Added an answer on June 2, 2026 at 4:34 am

    If I were to guess, I’d say that it’s this line:

    tblSystemAutoUpdate.AsBoolean := False;

    You’re trying to edit the value of a dataset field without its dataset actually being open.

    WRT debugging help, when you get the exception message and it asks you to Break or Continue, choose Break. The stack trace view (upper-left pane in the standard layout) will show you the function call stack of the current thread, and that should be able to lead you right to it. Also, make sure you build developer builds of your code with the “Use Debug DCUs” project option enabled. That will let you trace into RTL and VCL units in the debugger.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to create an if statement in PHP that prevents a single post
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.