tclientdataset

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

北战南征 提交于 2019-12-05 03:00:16
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 TDatasetProvider connected to a TSQLQuery connected to a TSQLConnection . The first 3 of these objects are encapsulated within a couple of classes in a library that I use in many places on several projects. These classes create these 3 objects at runtime and eliminate a significant amount of repetitious code, necessary as I have many, many of these triplets.

Refresh Nested DataSet with poFetchDetailsOnDemand

回眸只為那壹抹淺笑 提交于 2019-12-05 02:32:32
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 above refreshes the entire Master dataset, not just the current record. Now, the following code seems to do anything: DM.ClientDataSet1.RefreshRecord; Is there a workaround or a proper way to do what I want? (maybe an interposer...) Additional Info: ClientDataSet1 = Master Dataset ClientDataSet2 = Detail DataSet , is the following: * object ClientDataSet2:

Refreshing a ClientDataSet nested in a DataSetField

谁说我不能喝 提交于 2019-12-04 18:03:42
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 nearly works. My code below basically does a detail refresh by temporarily applying a filter to the

TClientDataSet Doesn't Release Memory

佐手、 提交于 2019-12-04 17:00:13
I have a DataSnap server that creates a TSQLQuery, TDataSetProvider and a TClientDataSet that are unique to a given user's session, which are used and reused to retrieve data from a database and send TClientDataSet.Data (an OleVariant) to the client. It works very well, except for one problem. When I populate the TClientDataSet by calling its Open method, the memory that is allocated is not freed until the user disconnects their client from the DataSnap server. As the user uses the application and continues to retrieve data from the DataSnap server, memory continues to be allocated (hundreds

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

心不动则不痛 提交于 2019-12-04 10:58:30
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 find what character will trigger the above error. Anyway: I find it much more clearer for an XML file

Read a Delphi TClientDataset Files with .NET

放肆的年华 提交于 2019-12-01 07:03:38
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. Fabricio Araujo "A dotNet program that does not run on Windows platform" means to me that you're deploying a Mono application. Possibly on Linux, if that's the case try WINE and see if the Delph app suggested above works as expected. If yes, your problem of leaving the dotnet app machine is solved as both will run on the same hardware without communication through network. EDIT: since the OP now specified that he's using MonoDroid and Monotouch, and

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

泄露秘密 提交于 2019-11-30 19:41:43
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 will relate. My Delphi is XE (version 1, Update1). I am using Postgres which generates error messages in Portuguese (Portuguese Brazil) and for this reason the error messages have accents. The connection components are ZeosLib package. I am using a dialog box "reconcile error" to display errors arising from the application of updates and to test, I

Delphi - Is TClientDataset Thread Safe?

梦想的初衷 提交于 2019-11-30 13:12:33
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. The short answer is no, a ClientDataSet is not thread safe. The more involved answer is that it depends on how you use it. No matter how many clones of the ClientDataSet you have, they are safe to use from multiple threads so long as you are only reading the data. This is true even if you are setting different ranges, current records, filters, and so forth. And, though you did not ask about

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

邮差的信 提交于 2019-11-30 04:54:36
问题 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 will relate. My Delphi is XE (version 1, Update1). I am using Postgres which generates error messages in Portuguese (Portuguese Brazil) and for this reason the error messages have accents. The connection components are ZeosLib package. I am using a

How can I add fields to a clientdataset at runtime?

浪子不回头ぞ 提交于 2019-11-30 04:10:26
问题 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 as a parameter and gives back the city belongs to this postalcode. The problem is only about adding a calculated field to the already existing ones. Filling the data itself is not the problem. I tried: cds.SetProvider(Table1); cds.FieldDefs.Add(