tclientdataset

Refreshing a ClientDataSet nested in a DataSetField

天大地大妈咪最大 提交于 2019-12-09 21:12:49
问题 I've nearly finished some code to solve the problem in this unanswered q from last year: Refresh Nested DataSet with poFetchDetailsOnDemand Received wisdom is that it's not possible to refresh the nested detail CDS from the server without closing and re-opening the master CDS, but obviously that can generate a disproportionate amount of network traffic, just to refresh a single master row and its detail rows. I thought of a straightforward way to refresh the detail CDS from the server and it

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

允我心安 提交于 2019-12-08 15:11:20
问题 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. Well, you can since my DSP can add an boolean field called Selected to the dataset data. The way I do that now: Create 2 TClientDataset objects (Origin and Target) In Origin, I load the data got from the parameters of the InternalGetRecords method (I

Filtering A TClientDataSet On A NestedDataSet Field

孤街浪徒 提交于 2019-12-07 13:36:51
问题 I have a small application I am working on that is almost finished thanks to those who have assisted me here. I have one last task however. I need to be able to Filter a TClientDataSet on a NestedDataSet field. ClientDataset1 Field0: Name (Lake Name) ClientDataset2 Field0: Species (Fish Species) type TDataModule1 = class( TDataModule ) ClientDataSet1: TClientDataSet; ClientDataSet2: TClientDataSet; ClientDataSet1Name: TStringField; ClientDataSet1County: TStringField; ClientDataSet1Town:

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

百般思念 提交于 2019-12-07 03:39:06
问题 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 network, I want to use in-memory aggregates instead of using sql . My idea is to add an aggregate to the ClientDataset with Expression like this: Sum(column1) And make Date_Column index, then filter the clientdataset like this: myClientdataset.SetRang

Reading and writing into the XML file

吃可爱长大的小学妹 提交于 2019-12-06 12:18:51
问题 I need to work on XML files using Delphi. I want to present the xml data in a DBGrid to the user and save the changes done by user in the XML file. For example in the below xml (which was presented to the user), if user changed City of ABC under client and added a new customer with NickName as "AAA" those changes should be reflected in the XML file. <Data LinkID=”0”> <Client> <Item Name=”ABC” Mobile=”1234” City=”IN” /> <Item Name=”PQR” Mobile=”5678” City=”IN” /> </Client> <Customer> <Item

TAggregateField not calculated when Index of ClientDataset changes

泄露秘密 提交于 2019-12-06 11:14:31
问题 I am using a TClientDataset, connected to a DBGrid, with a couple of Aggregate Fields, for calculating the SUM of an other couple of Float Fields. All fields have been created in Design time. Everything is working as expected, until the time that the IndexName of the ClientDataset changes with a custom Index, in order to sort the Grid. After that, the Aggregate Fields don't calculate their value properly, and they are set with Null value. The problem occurs in Delphi XE7. 回答1: I have google

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

时光毁灭记忆、已成空白 提交于 2019-12-06 05:52:48
问题 I am using Delphi7 ClientDataSet to read and write xml files for some of my data. Howerver, 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 processing resource' - even although the data reads and writes fine from within Delphi. Is there a way to force TClientDataSet to write it's contents in an indented way in stead in one line ? That way I could easily open it into a text editor and

Insufficient memory when opening TClientDataSet with a REPLACE in the underlying query

不羁的心 提交于 2019-12-06 03:51:39
My Delphi code opens a TFDQuery (FireDAC), then opens the TClientDataSet connected to it via a TDataSetProvider : ClientDataSetData.Close; with QueryData do begin Close; SQL.Clear; SQL.Add(ASelectSQL); Open; end; ClientDataSetData.Open; ASelectSQL contains this SQL: SELECT TT_NIV_ID, TT_NIV, REPLACE(TT_NIV_NAME, '|', '!') as TT_NIV_NAME2 FROM TT_SYS_PRJ_NIV The ClientDataSetData.Open gives an insufficient memory error on a dataset with 42200 records. If I inspect the result data (in the Delphi code) I see that TT_NIV_NAME2 is a string of length 8000! From the REPLACE() documentation : If

Filtering A TClientDataSet On A NestedDataSet Field

ぃ、小莉子 提交于 2019-12-05 20:05:58
I have a small application I am working on that is almost finished thanks to those who have assisted me here. I have one last task however. I need to be able to Filter a TClientDataSet on a NestedDataSet field. ClientDataset1 Field0: Name (Lake Name) ClientDataset2 Field0: Species (Fish Species) type TDataModule1 = class( TDataModule ) ClientDataSet1: TClientDataSet; ClientDataSet2: TClientDataSet; ClientDataSet1Name: TStringField; ClientDataSet1County: TStringField; ClientDataSet1Town: TStringField; ClientDataSet1Area: TStringField; ClientDataSet1MaximumDepth: TStringField;

PHP append to ClientDataSet CDS File

一曲冷凌霜 提交于 2019-12-05 16:59:38
I have an empty Delphi ClientDataSet CDS File setup with all the Columns/Headers/Datatypes that I need. I want to use PHP to append an associative array into CDS rows. Is this possible? The array could simply be: { 1: {Name:Captain, Phone:18001234567} 2: {Name:Jack, Phone:18009876543} 3: {Name:Sparrow, Phone:18887892345} } I've selected PHP because I'm proficient with the language and my web server is a shared-linux host. Basically I cannot run Delphi here. I'm open to other options that could work in this environment. Thanks! EDIT: See the comments on this post for my resolution. I recommend