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

  • Home
  • SEARCH
  • 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 3500754
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:46:25+00:00 2026-05-18T12:46:25+00:00

I am making a app in Delphi 6 + MySQL database using standard data-aware

  • 0

I am making a app in Delphi 6 + MySQL database using standard data-aware components and dbExpress. The app allows a users to view records in a grid and edit data (insert and/or delete records) client side. These data edits are then only written to database on clicking the submit button. All of this works fine and has the following setup:

Controls:
1. DBGrid1 linked to a DataSource1 to display data visually.
2. DataSource1 is linked to ClientDataSet1 to offer data for DBGrid to display.
3. ClientDataSet1 is linked to DataSetProvider1 to provide client-side data for editing.
4. DataSetProvider1 is linked SQLDataSet1 which selects records from a single DB table.
5. SQLDataSet1 is linked to SQLConnection to provide connection to MySQL database.

Actions:
1. User inserts a record: I use ClientDataSet1.InsertRecord;
2. User deletes a record: I use ClientDataSet.Delete;
3. User submits data: I use ClientDataSet1.ApplyUpdates(-1);

This all works great in terms of handling data & posting data (with the inclusions of a small hack on DataSetProvider1BeforeUpdateRecord to delete records).

NOW FOR MY PROBLEM:
When the user first loads the form, the DBGrid1 displays all original records, removes all deleted records. But when the user inserts a new record in ClientDataSet1, a blank record is displayed in DBGrid1. The actual data is not lost or set as NULLS as when you ClientDataSet1.ApplyUpdates, this record is correctly written to the DB.

I know TClientDataSet has a data property for original data and a Delta property for edited data. Can these two properties with data by displayed in a single DBGrid at one time & still allowing the user to edit the data?

I have looked at 30+ resources and demo apps & all avoid this issue. Can this be done?

  • 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-05-18T12:46:25+00:00Added an answer on May 18, 2026 at 12:46 pm

    Ok…this question has been viewed a fair amount without much feedback. I did some research by downloading many tutorials, demo apps & read multiple articles/help info discussing the use of these controls.

    The net result:

    1. These controls are a bit buggy in general.
    2. In specific reference to my question, it is safe to say the controls cannot do what I describe as a standard.

    This is based on the 30+ demo apps, articles and tutorials I reviewed that either don’t describe displaying both the original data with Delta data in a single data grid. Sure you could hack this outcome (which is what I did) using a Listbox or StringGrid, but that also indicates the control cannot or not usable at providing this functionality (on the slim chance it might).

    This functionality is an obvious oversight in my opinion as a user wants to see the potential outcome of their actions, conveniently in a single data grid AND a developer wants to provide that in a simple & pain free way i.e. using a datagrid to display data!

    Question Answered [if you can prove differently with a demo app that I want to review, I will remove this].

    If you created a demo app and couldn’t get it to work, up vote my answer. Thanks

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

Sidebar

Related Questions

I am making a little GUI frontend for a app at the moment using
Im making an app for the iphone using cocos2d and i am trying to
I am making an app that allows the user to set an alarm based
i am making an app in which user's data is send to a server...the
I'm making another app's window topmost to ensure that a click in my app
I am making an app that scrolls information on the desktop. The window is
I'm making a WinForms app with a ListView set to detail so that several
I am making a C# app for a class project. I want to ensure
I'm developing a simple Qt 4 app and making my own dialog. I subclassed
After making a few modifications to a rails app I am tinkering on, railroad

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.