KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Remote DataStore Compiler 550.5 Warnings
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: July 18, 2022

When using a remote data store, many of the examples of the documentation show the declaration of the variable as a DataStore class.

For example:

var $remoteDS : cs.DataStore


While it is typically suggested to declare variables as a class if possible, with the remote data store this can cause compiler warnings. The warnings are due to calling a Data Class (Table) from the remote data store, however the class does not exist in the current database.


There are some workarounds to this issue:

1) Ignore the Warnings - The warning is only a warning. If the implementation is correct the code should function as expected.

2) Declare the variable as an object - While it is nice and informative to declare variables as a specific class when possible, in these scenarios there is no benefit to declaring the variable as the remote data store's table class.
Since the class does not exist in the local database there will be no suggestions for fields and functions and it will be no different than using an object.

3) Disable the warning for the method or class - A warning can be disabled for a method by entering a comment with the following pattern:
//%W-{warning number}
In this case, to ignore the 550.5 warning, add the following comment to the methods impacted:
//%W-550.5

4) Add the tables into the client database - If a database will be accessing a specific remote datastore, and the fields and tables are known and will be referenced by code, the tables being used can be added. This will create the classes for these tables. This allows the compiler to find the data class for the table and prevent the warning from appearing.

This is an expected warning and these are some of the ways to workaround the issue.