Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/Midas/TClientDataSet    [ Add a report in this area ]  
Report #:  431   Status: Closed
Cannot use "CreateDataSet" with InternalCalc Fields
Project:  Delphi Build #:  6.24
Version:    6.0 Submitted By:   Simon Hooper
Report Type:  Crash / Data loss / Total failure Date Reported:  4/4/2002 12:12:37 AM
Severity:    Commonly encountered problem Last Updated: 6/6/2003 10:37:25 AM
Platform:    All versions Internal Tracking #:  
Resolution: Test Case Error (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (6 Total Ratings)
2.83 out of 5
Total Votes: None
Errors with "Name not unique in this context" on second call to CreateDataSet when InternalCalc fields are defined.
Steps to Reproduce:
1.  Add TClientDataSet to Form (or Datamodule)

2.  Double click and define two new fields.
one with field type "Data"
the other with field type "Internal Calc"

3.  Put following code being a button

  with ClientDataSet1 do begin

4.  Run form and click button.
Use Data fields instead of InternalCalc fields.


Dave Rowntree:

  with ClientDataSet1 do begin
    FieldDefs.Clear;    // ADD THIS LINE ...

Dave Rowntree at 8/12/2002 5:04:17 AM -
Your short description statement that:

'Cannot use "CreateDataSet" with InternalCalc Fields'

is not correct. It is possible to use CreateDataSet on a CDS that contains persistent InternalCalc fields, as the first CreateDataSet call in your 'Steps' app demonstrates.

I am not convinced that the situation you describe is a bug, and not just a limitation of using InternalCalc fields with CreateDataSet.

Build the app created by your 'Steps'. Instead of running the app, right click on the CDS and click CreateDataSet from the context menu. Then close the CDS and right click again. You will see that the CreateDataSet menu item has been replaced by a 'Clear Data' item. The IDE prevents you from running CreateDataSet again.

Server Response from: ETNACODE01