Problem with AdvMyCloudDataDataSet

I'm trying to use VCL AdvMyCloudDataDataSet and tried your demo. Unfortunately it is not working. I also tried FMX version and it vorks as expected. It connects with the account, creates the table and it is able to store added records. The same demo of the VCL version doesn't work. It connects but doesn't display any fields except ID. It doesn't show any existing records ( created with FMX demo). What's wrong?

Please enable logging on this component and send us the log file of a session so we can see where something is wrong.

If you could explain - I'm not sure how to do it - do you mean AdvMyCloudDataDataSet1.LogChanges := true ?

The logging is via the connection:

  AdvMyCloudDataConnection.CloudData.Logging := true

Looks like I need more help with that. I'm not sure where to look the log. Setting AdvMyCloudDataConnection1.CloudData.LogFileName := 'ConnectionLog.txt'; also doesn't help so I'm little bit lost.

On the other hand I tried to run this demo :
...\Public\Documents\tmssoftware\TMS VCL Cloud Pack Demos\myCloudDataDataSetDemo
on two different computers using Delphi Berlin and Tokyo getting the same result  - AdvMyCloudDataDataSet would not get any data from myCloud. I just wonder if the problem is with my set-up or there is something wrong with the component itself. 

When you do not specify a path for LogFileName, it should output the logging in the active directory of the app (normally the app where the .EXE file is located. Otherwise, specify an absolute path.

In order to be able to tell anything useful on what is happening, we really need to see the detailed log.

Well - without specifing a path the file is created in Documents folder. The log shows all fields, the grid displays only the "_ID" field. Not many details. Is there any other switch that would produce more information in the log?


20180221T102509:HTTPS GET RESULT:[
 {
  "tableid": 1616,
  "tablename": "CONTACTS",
  "permissions": "CRUD",
  "ownerid": 971,
  "isowner": true
 }
]
20180221T102509:HTTPS GET RESULT:[
 {
  "column_name": "_ID",
  "is_nullable": "NO",
  "data_type": "bigint",
  "character_maximum_length": null
 },
 {
  "column_name": "NAME",
  "is_nullable": "YES",
  "data_type": "nvarchar",
  "character_maximum_length": 50
 },
 {
  "column_name": "EMAIL",
  "is_nullable": "YES",
  "data_type": "nvarchar",
  "character_maximum_length": 50
 },
 {
  "column_name": "SEX",
  "is_nullable": "YES",
  "data_type": "nvarchar",
  "character_maximum_length": 1
 },
 {
  "column_name": "PICTURE",
  "is_nullable": "YES",
  "data_type": "varbinary",
  "character_maximum_length": -1
 },
 {
  "column_name": "BIRTHDATE",
  "is_nullable": "YES",
  "data_type": "date",
  "character_maximum_length": null
 },
 {
  "column_name": "FRIEND",
  "is_nullable": "YES",
  "data_type": "bit",
  "character_maximum_length": null
 }
]
20180222T084744:HTTPS GET RESULT:[
 {
  "tableid": 1616,
  "tablename": "CONTACTS",
  "permissions": "CRUD",
  "ownerid": 971,
  "isowner": true
 }
]
20180222T084745:HTTPS GET RESULT:[
 {
  "column_name": "_ID",
  "is_nullable": "NO",
  "data_type": "bigint",
  "character_maximum_length": null
 },
 {
  "column_name": "NAME",
  "is_nullable": "YES",
  "data_type": "nvarchar",
  "character_maximum_length": 50
 },
 {
  "column_name": "EMAIL",
  "is_nullable": "YES",
  "data_type": "nvarchar",
  "character_maximum_length": 50
 },
 {
  "column_name": "SEX",
  "is_nullable": "YES",
  "data_type": "nvarchar",
  "character_maximum_length": 1
 },
 {
  "column_name": "PICTURE",
  "is_nullable": "YES",
  "data_type": "varbinary",
  "character_maximum_length": -1
 },
 {
  "column_name": "BIRTHDATE",
  "is_nullable": "YES",
  "data_type": "date",
  "character_maximum_length": null
 },
 {
  "column_name": "FRIEND",
  "is_nullable": "YES",
  "data_type": "bit",
  "character_maximum_length": null
 }
]
 

Hi,


- The log data you provided does not indicate any issues have occured.
You can set CloudData.LogLevel to llDetail which will include more detailed data if available.

- I have not been able to reproduce this issue myself.
After running the the FMX demo and adding a record, the table is created as expected and the record also shows up in the VCL demo.

Can you try the following to see if this changes the incorrect behavior?
- Try adding a record in the VCL demo.
- Set a different name for the table in the VCL demo to force the app to create a new table.
- Delete the table and run the VCL demo first. Then add a record in the VCL demo.

This is what I did. I recreated the VCL application in a different folder, changed the name of the table and tried to run it. This time everything worked. I got fields in the grid, was able to add records to the table and after restarting the application I got them back into the grid. Now I changed the name of table to the old one and tried to run it again. The same problem - got connected but no records in the grid - only one ID column with empty record. The log didn't show any errors. Then I loaded the FMX application with the same (old) table name and it loaded existing records without any problem. 

Looks for me that just playing with VCL components I was able to break the metadata of the table in such a way that VCL component is not able to retrive any data but FMX component doesn't have a problem with it. And it doesn't show in the log in any way. So for now  I know that I have to recreate the table if something like this would happened again. I'm not sure if some kind of integrity test for tables and metadata on myCloudData is possible but it would be good to have something like that in the future. 
Thanks a lot for your help.

Would it be possible to contact us by email and provide the credentials for your account so we can test from here. It is fully unclear how the FMX version would behave different from the VCL version as the code is exception for authentication & authorization, fully identical between VCL & FMX.

Small update. I had this problem again with different table but this time I deleted the AdvMyCloudDataDataSet component, put a new one in its place, deleted cache files of the project and that solved the problem.