Fields, definition, json package

Dear Sirs,

could you provide raw json package definition (format) for TWebClientDataset.Fields. When you double-click on TWebClientDataset to fetch all fields.

Kind Regards

A JSON array should do.

At minimum we need to include fieldtype and size into the package. An example how the package would be structured please.

This seems to detect field names but does not add fields since the format is not complete.

Kind Regards

The TWebClientConnection loads the TWebClientDataSet from a JSON array. It performs a best match depending on the JSON data found for the field types selected in the TWebClientDataSet.
If what is available in a JSON array is not satisfactory for the selection of the field type, you will need to retrieved the field information separately at application level and add the fields to the TWebClientDataset programmatically.

Double click on TWebClientDataset at design-time returns message:
Fields automatically retrieved:

Fields are instantiated in dcl(vcl) environment but are not added in dfm or pas for some reason. Hence are not saved. Can this be corrected?


Kind Regards

Cannot be reproduced.
See Demo\Basics\DBGrid where the DB fields are persisted.

Adding field one by one works but is not practical if you have a lot of them.
To repeat scenario: Delete all persisted fields first. Then use "Fetch Fields ..." from popup menu on WebClientDataset1 component. Nothing happens (we are talking about Demo\Basics\DBGrid) - no fields are persisted.

Kind Regards

After "Fetch Fields", you should get a dialog that shows the fields found.
After this, go to "edit fields" and select from the context menu "Add all fields".

The proposed solution works.

Thank You

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.