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
5
votes
3 answers

How to override sort mechanism of TClientDataSet

Is it possible to change the way indexes are used in TClientDataSet to sort records? After reading this question, I thought it would be nice to be able to sort string fields logically in a client dataset. But I have no idea how to override default…
iMan Biglari
  • 4,674
  • 1
  • 38
  • 83
5
votes
3 answers

OnValidate for a TClientDataSet

I'm trying to write an OnValidate event on a field on a TClientDataSet, something along the lines of procedure TForm8.ClientDataSet1MyFieldValidate(Sender: TField); begin if Sender.AsFloat > 30 then raise Exception.Create('Too…
Alister
  • 6,527
  • 4
  • 46
  • 70
5
votes
3 answers

How can I detect if ApplyUpdates will Insert or Update data?

In the AfterPost event handler for a ClientDataSet, I need the information if the ApplyUpdates function for the current record will do an update or an insert. The AfterPost event will be executed for new and updated records, and I do not want to…
mjn
  • 36,362
  • 28
  • 176
  • 378
4
votes
3 answers

How is it possible to manually execute the "OnCalcFields" event?

Say that I temporarily want to disable the OnCalcFields event (eg. by setting cdsCalcFields := nil) during a time-consuming operation on a TClientDataSet. How can I tell the TClientDataSet to perform a recalculation of the calculated fields when I…
Jørn E. Angeltveit
  • 3,029
  • 3
  • 22
  • 53
4
votes
3 answers

Read a Delphi TClientDataset Files with .NET

I need to read Files that are written with the TClientDataset class from Delphi with .NET Code. The Solution mentioned here does not work for me.
Noffls
  • 5,397
  • 2
  • 29
  • 36
4
votes
1 answer

What is the proper way to declare an event handler with arguments for a tclientdataset component at runtime

I am attempting to define a ClientDataSet component in a form at runtime. I can successfully define all the fields and operate the ClientDataSet in the VCL form program, however when I attempt to add an event handler for events such as AfterInsert…
Ashlar
  • 636
  • 1
  • 10
  • 25
4
votes
3 answers

Error:the filename directory name or volume label syntax is incorrect, in Delphi 7 CopyFile Function

I want to copy files from one folder to another using CopyFile function. The source files paths are stored in a ClientDataSet called "itemsDB". The code is : Var Source, Dest : String; Begin itemsDB.First; While Not itemsDB.EOF do Begin …
riad
  • 361
  • 1
  • 9
  • 19
4
votes
4 answers

Using Delphi7 TClientDataSet: is it possible to have it save its XML contents in an indented format?

I am using Delphi7 TClientDataSet to read and write XML files for some of my data. However, when I want to browse this outside the program (double clicking the XML in Windows Explorer) I get the 'An invalid character was found in text content. Error…
Edelcom
  • 5,038
  • 8
  • 44
  • 61
4
votes
1 answer

Is there a limit for TClientDataSet filter, or is it a bug?

I'm using a TClientDataSet as an in-memory table and must apply a filter with a lot of conditions. For example, with 400 OR conditions, I get an access violation when I try to enable the filter. Access violation at address 4DAEDC76 in module…
Rodrigo Farias Rezino
  • 2,687
  • 3
  • 33
  • 60
4
votes
2 answers

to track the modified rows and manually update from the TClientDataSet's Delta

Is there any way to manually track the changes done to a clientdataset's delta and update the changes manually on to then db. i have dynamically created a clientdataset and with out a provider i am able to load it with a tquery, now user will do…
Vijay Bobba
  • 313
  • 4
  • 15
4
votes
0 answers

Why TFDMemTable is slower than TClientDataSet?

The Embarcadero official said "TFDMemTable is faster than TClientDataSet",But I Make an little speed test and TFDMemtable slower than TClientDataset (Delphi XE7). { Test 30k records TClientDataSet TFDMemTable Append 1482ms …
Natural
  • 51
  • 1
  • 4
4
votes
0 answers

What is the most elegant way to reposition after filtering a TClientDataset

I'm working on a TClientDataset that the user can filter at any time based on some criterias. My problem is, we'd like the dataset's cursor to remain positionned "mostly" at the same place after filtering. ("Mostly" in double quote since, of course,…
Ken Bourassa
  • 6,363
  • 1
  • 19
  • 28
4
votes
3 answers

DataSetProvider - DataSet to ClientDataSet

EDIT: It seems as if the DataSetProvider doesn't have the functionality I need for this project, so I'll be implementing a custom class for loading the data into the ClientDataSet. I am trying to take data from a TMSQuery which is connected to my DB…
LostNomad311
  • 1,975
  • 2
  • 23
  • 31
4
votes
1 answer

XE6 ClientDataSet AV attempting to load data from Firebird

I have a minimalist project with FireDac FDConnection & FDSqlQuery, DataSetProvider and ClientDataSet, trying to access the example Employee.FDB that came with the Firebird 2.5 package I downloaded from SourceForge today. Everything is set to the…
MartynA
  • 30,454
  • 4
  • 32
  • 73
4
votes
1 answer

TClientDataSet Traverse & Delete record cause some record being traverse twice in the while-loop (If with Index)

I have the following code which traverse all data in the TClientDataSet, my purpose is to delete all records except DocKey=20381. But with the following codes, you will notice record with DocKey=20381 being traversed twice (traverse times = 6,…
Sherlyn Chew
  • 189
  • 1
  • 2
  • 8
1 2
3
19 20