This script Writes a time stamped row of
data to an ODBC database.
WebDATA is an ODBC DSN to an Access Database on SCADA Node.
Table1 is the name of a Data Table in the Access database.
%TTMDATE and %TTMTIME are text type data and enclosed in single quotes.
AMPLITUDE and TIMER are numeric data and
are not in quotes.
The data types have to match the database.
SQLDIRECT "CONNECT SESSION 1 TO WebDATA"
SQLDIRECT "USE SESSION 1"
# For ODBC Databases that do not support level 2 commands
# (e.g. Access) data ordered as it appears in data table
SQLPREPARE "INSERT INTO Table1 VALUES (
SQLPREPARE '[GETVAL %TTMDATE]','[GETVAL %TTMTIME]',
SQLPREPARE [GETVAL AMPLITUDE], [GETVAL TIMER])"
SQLEXECUTE
SQLDIRECT "CLOSE C1"