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.

299 questions
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,914
  • 11
  • 61
  • 77
7
votes
2 answers

TClientDataSet uses too much memory for string fields

I was triggered to ask this question when trying to support this question with an MCVE. I recently started noticing that TClientDataSet quickly runs out of memory. I had an issue in production where it couldn't load a dataset with about 60.000,…
GolezTrol
  • 114,394
  • 18
  • 182
  • 210
7
votes
1 answer

TClientDataSet.ApplyUpdates() doesn't apply updates

My Delphi project has a TAdoQuery accesssing data on an MS Sql Server 2014 server, and TClientDataSet that receives the AdoQuery data via a TDataSetProvider. This is created from a Project Template I set up. Normally, I've found this set-up to work…
Alex James
  • 696
  • 5
  • 13
7
votes
1 answer

TClientDataSet: How to keep local data save and available when a database structure has been changed

Hello code enthusiasts! I have a question, which is no doubt due to some inexperience of my Delphi XE2 knowledge. I'll try to explain it here. Introduction: I have an Interbase database with data. This database is located on a remote machine. The…
RvdV79
  • 2,002
  • 16
  • 36
6
votes
1 answer

Delphi: How to aggregate just the ranged records in TClientDataset?

I need to make some aggregates using TClientdataset. In SQL these aggregates can be done with script like this : Select Sum(column1) from table1 where Date_Column < Date_Value Because I need more speed during a very long process and a very slow…
Robin-Hood
  • 345
  • 3
  • 11
6
votes
2 answers

Check if row was changed in a TClientDataset

I have a TClientDataset with n fields and I have to loop through them to count how many have changed but doing: if (Cds.fields1.Value <> Cds.fields1.OldValue) and (Cds.fields2.Value <> Cds.fields2.OldValue) etc.... or looping through Cds.fields[I]…
Lucas Steffen
  • 1,244
  • 2
  • 10
  • 22
6
votes
4 answers

TClientDataSet works VERY SLOW with 100K+ rows

i have problem retrieving data with Delphi TClientDataSet Code with ADO: ADOQuery1.SQL.Text:='SELECT * FROM Table1 WITH (NoLock)'; DataSource1.DataSet:=ADOQuery1; DataSource1.DataSet.Open; DataSource1.DataSet.Last; Code above returns over 180k rows…
Valeriy
  • 131
  • 2
  • 5
6
votes
2 answers

Reverse the order on an index for a ClientDataSet

I'm wanting to reverse the order of an index in a TClientDataSet, the following code looks like it should do the trick but does nothing. Is there a nice way to reverse the order of an index? procedure TForm8.Button1Click(Sender: TObject); var …
Alister
  • 6,527
  • 4
  • 46
  • 70
6
votes
1 answer

Aggregating a calculated field in TClientDataset

Is it possible to add an aggregate field over a calculated field? Suppose there is a cds with following fields: ID(autoincrement) Name(string) Price(float) Quantity(integer) Total(integer) - calculated field - Price * Quantity and I want to add an…
DreadAngel
  • 772
  • 11
  • 30
5
votes
3 answers

"No value for parameter" error message

I'm new to Delphi7. When I try to use the editor's "Add all fields" feature on a TClientDataSet object a messagebox (the classic error message box) appear with the message "No value for parameter '(the name of the parameter)'". I can't add fields…
Francesco
  • 1,742
  • 5
  • 44
  • 78
5
votes
1 answer

Delphi: Access Nested Dataset master information when applying update

Can I access the parent dataset information (like MyField.NewValue) in the BeforeUpdateRecord event of a provider when applying the updates to the nested dataset? Reason: When I apply updates to a CDS that has a nested detail, the master PK is…
Pascal D
  • 258
  • 2
  • 9
5
votes
4 answers

Invalid parameter error with TClientdataset

What is the reason for getting an 'invalid parameter error' when calling the CreateDataSet method in a TClientDataSet component. What causes this error.
Riaan de Villiers
5
votes
1 answer

Processing a ClientDataset's Delta

I've been having a problem with some code which is supposed to process a TClientDataSet's Delta, which I've boiled down to the following test case. I have two ClientDataSets, cdsData and cdsDelta, both with a DataSource, DBGrid and DBNavigator, and…
Alex James
  • 696
  • 5
  • 13
5
votes
2 answers

Is TCustomClientDataSet CloneCursor thread safe?

I have read that cloned TClientDataSets are thread safe if the clones are read only (no posting of records or reloading of data) Delphi - Is TClientDataset Thread Safe? But I'm concerned about the CloneCursor method itself; the method ends by…
CAnder
  • 127
  • 8
5
votes
1 answer

How to change Clientdataset field datatype at runtime

For Delphi ClientDataSets where fields have been define at design time, is there a way at runtime to change a specific field's datatype ( change the cds.Fields[n].DataType) ? I have a legacy Delphi 7 program with both SQLDataSet and ClientDataSet…
edbored
  • 274
  • 4
  • 11
1
2
3
19 20