Writing to fields with reserved names from DataHub Data Logger
I need to log data to an existing table, but I get a message indicating the field name is reserved. What can I do?
Many keywords are reserved by ODBC, such as DateTime. Realizing that you may need to log to these fields if using an existing table, DataHub has a work-around:
To enable DataHub to log to a field using a keyword, you must force the DataHub to surround column names in back-quotes.
To do this:
- Edit the file C:\Program Files\Cogent\Cogent DataHub\require\ODBCTypes.g
- Find the definition
class ODBCAccessDriver ODBCDriver - Before the
static:line in the class definition, add this line: columnquote = "`";- That is: a double-quote, a back-single-quote, and another double-quote.
- Shut down and re-start the DataHub.