Syntax Errors Logging from Advanced Simulator to SQL using TOP Server DataLogger
I am trying to log data from my TOP Server Advanced Simulator driver to a SQL database using the TOP Server DataLogger plug-in. Every time I enable my log group, I receive the following error:Failed to create the data table for log group 'x' (Reason 'Line 1: Incorrect syntax near ',''.')How can I resolve this error?
When using the Advanced Simulator driver, tags are automatically generated after you have selected the desired table to use as a data source. These tags are automatically given a default data type of "Double".
SQL does not support the "Double" data type, so a syntax error is generated in response to trying to create a table that is logging tags that are a "Double" data type.
The way to resolve this problem is to change the data type of the tags in TOP Server. "Double" is a 64-bit Floating Point value. If your expected values will have decimal places, I would suggested changing the data type to "Float" in TOP Server. The data type should reflect the data that you will be logging as closely as possible.
Please consult the TOP Server help file for a list of supported data types.
You will also need to remap the affected tags in your DataLogger configuration once you have changed the data types, since the changes will not migrate to your DataLogger configuration.