Questions tagged [tclientdataset]

TClientDataset represents an in-memory dataset implementing a database-independent dataset. It is defined in the DBClient.pas unit.

TClientDataset represents an in-memory dataset implementing a database-independent dataset. It is also known as MyBase. It is defined in the DBClient.pas unit.

288 questions
19
votes
1 answer

How can I delete all the records from a TClientDataset at once?

Is possible delete all the records from a TClientDataset at once?
Salvador
  • 15,053
  • 31
  • 128
  • 232
15
votes
1 answer

ClientDataset.RefreshRecord no longer works in Delphi XE for joined tables - any workarounds?

TClientDataset.RefreshRecord no longer generates the table join part of SQL when trying to refresh a record on a ClientDataset connected to a dataset with a joined table in the SQL statement. As a result, calling this method results in SQL error…
Gary
  • 159
  • 3
12
votes
3 answers

Moving Columns in a DBGrid seems to move the attached DataSet fields

I observed something last week that I did not expect, and will describe below. I am curious as to why this happens. Is it something internal to the TDataSet class, an artifact of the TDBGrid, or something else? The order of the fields in an open…
Cary Jensen
  • 3,554
  • 2
  • 29
  • 49
12
votes
2 answers

MidasLib.dcu makes the application slower

I´m declaring MidasLib to avoid dll hell caused by Midas.dll in some clients. The code below runs in about 2350ms. If I remove the MidaLib declaration in uses it starts to run in just 45ms!! The data.xml file was saved with TClientDataSet.SaveToFile…
Roger Perezin
  • 121
  • 1
  • 6
12
votes
4 answers

Faster way to move data from a dataset structure to another (in TDatasetProvider)

I have an custom TDatasetProvider that allows to create new fields to whatever data it provides. So, let's say you got the folowing fields on the original dataset: CustomerId Name Age And you need to select it on DBGrid using showing an Bitmap.…
Fabricio Araujo
  • 3,868
  • 1
  • 25
  • 40
11
votes
3 answers

How long does a TDataset bookmark remain valid?

I have code like below in a project I'm working. procedure TForm.EditBtnClick(Sender:TObject); begin // Mark is form variable. It's private Mark = cdsMain.GetBookmark; // blabalbal . . . end; procedure…
Fabricio Araujo
  • 3,868
  • 1
  • 25
  • 40
11
votes
5 answers

How can I add fields to a clientdataset at runtime?

I have a TClientDataSet, which is provided by a TTable’s dataset. The dataset has two fields: postalcode (string, 5) and street (string, 20) At runtime I want to display a third field (string, 20). The routine of this field is getting the postalcode…
CloudyMarble
  • 34,949
  • 69
  • 92
  • 126
10
votes
3 answers

Delphi - Is TClientDataset Thread Safe?

I have a TClientDataset that is managed in Thread 1. In a different thread I have a cloned Image of the TClientDataset. Will I run into threading problems? Edit The cloned image is used in a read only mode.
Charles Faiga
  • 11,404
  • 25
  • 96
  • 137
10
votes
2 answers

How to force a Client DataSet to recalculate calculated and internal calculated fields?

I have a ClientDatSet with a few fkInternalCalc fields. The CDS is not linked to any provider; instead it's filled on the fly. How can I force CDS to recalculate all the "calculable" fields? I can not call Refresh() because there is no provider to…
iMan Biglari
  • 4,426
  • 1
  • 30
  • 78
9
votes
3 answers

Anyone that has a partial XSD that describes the METADATA section of Delphi TClientDataSet XML files?

I know that you cannot fully describe the XML that the TClientDataSet with an XSD schema, as the ROW elements have attributes that have names that vary with the contents. However, the METADATA section of such an XML should be. So: is there anyone…
Jeroen Wiert Pluimers
  • 23,000
  • 6
  • 63
  • 142
9
votes
1 answer

Refresh Nested DataSet with poFetchDetailsOnDemand

Is there a way to refresh only the Detail DataSet without reloading all master dataset? this is what I've tried so far: DM.ClientDataSet2.Refresh; DM.ClientDataSet2.RefreshRecord; I have also tried: DM.ClientDataSet1.Refresh; But the method…
EProgrammerNotFound
  • 2,333
  • 4
  • 21
  • 54
8
votes
2 answers

I need to avoid attempting to update non-physical fields in a Delphi TClientDataset connected to a TSQLQuery

Precis: My code is attempting to update non-physical fields in a Delphi XE TClientDataset, (connected to a TSQLQuery with its SQL property set) that were created as result of a runtime Open command. I have a TClientDataset connected to a…
Chris Bargh
  • 197
  • 1
  • 1
  • 9
7
votes
1 answer

Reconcile Error: Has anyone had problems with truncated error messages?

I'm here again to ask for a help to you. This time I believe that few will respond given the great particularity of the problem which I will relate. I'm starting in the world of DataSnap, and still have things I do not understand how this error I…
7
votes
0 answers

TClientDataSet and processing records with StatusFilter

I'm using a TClientDataSet as a local dataset without the provider concept. After working with it a method is called that should generate the corresponding SQL statements using the StatusFilter to resolve the changes (generate SQL basically). This…
pragmatic_programmer
  • 3,138
  • 2
  • 23
  • 34
7
votes
2 answers

Correct way to check if a blob field has already been fetched when using poFetchBlobsOnDemand

I have a TClientDataSet with several records, and I want o load all the records, but load the blob field on Demand, one at a time. I noticed that calling FetchBlobs twice fetches the blob twice and also that checking the field's IsNull property…
Fabio Gomes
  • 5,688
  • 11
  • 57
  • 76
1
2 3
19 20