Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One of the drawbacks of calling the GetDatabaseItem service is that property names are formatted with underscores (i.e., how they appear in the dictionary) rather than as camel case (which is the conventional format for JSON objects). Another drawback is that the GetDatabaseItem service attempts to create a resource object from all column data (both physical and calculated). This might be undesirable if some of the data is meaningless to the client. Consider the picture property in the above resource object. It references an image file stored locally on the server, which has no value to the client. This can also be problematic if a calculated column encounters a runtime error or is dependent upon information that only exists within an OpenInsight desktop session. To resolve both of the above itemsavoid these problems, we will take advantage of the optional ColumnNames and ItemArrayLabel arguments. To keep our sample code simple and concise, we will limit our resource to just the FIRST_NAME, LAST_NAME, ADDRESS, CITY, STATE, and ZIP database columns:

...