ODBC Logging to SQL Server
cbraatz,
Format of database table is entirely up to you. You can specify SQL query to insert record to the log. So, format of table must be corresponding to your SQL query.
Just for example you can create table (hmlog) with 1 date field (named date1), and 4 string fields (named: date1, time1, testname, status, reply). To insert records use SQL query like:
Insert into hmlog (date1, time1, testname, status, reply) VALUES (%Date%, '%Time%', '%TestName%', '%Status%', '%Reply%')
Regards
Alex
Format of database table is entirely up to you. You can specify SQL query to insert record to the log. So, format of table must be corresponding to your SQL query.
Just for example you can create table (hmlog) with 1 date field (named date1), and 4 string fields (named: date1, time1, testname, status, reply). To insert records use SQL query like:
Insert into hmlog (date1, time1, testname, status, reply) VALUES (%Date%, '%Time%', '%TestName%', '%Status%', '%Reply%')
Regards
Alex
By default HostMonitor uses your system date format. Perhaps your SQL server (or ODBC driver) doesn't like this format?
I see two ways to test this:
- change type of "time" field to string.
- set "Use fixed date&time formats" option (on Miscellaneous page in the Options dialog) and specify date format supported by your SQL server.
Regards
Alex
I see two ways to test this:
- change type of "time" field to string.
- set "Use fixed date&time formats" option (on Miscellaneous page in the Options dialog) and specify date format supported by your SQL server.
Regards
Alex
Alex
I understand that output from Host Monitor to odbc database connections depend of which table structure I specify in query, but I have to know how I can specify field name from Host Monitor log for example: %date%, %testname%, %status%, %reply% are working find but when I use %lasttesttime% or %comment% or all other columns from log file I got zero output to the my table. Please, provide the right syntax for all columns name from Host Monitor log file.
Thank you. I
I understand that output from Host Monitor to odbc database connections depend of which table structure I specify in query, but I have to know how I can specify field name from Host Monitor log for example: %date%, %testname%, %status%, %reply% are working find but when I use %lasttesttime% or %comment% or all other columns from log file I got zero output to the my table. Please, provide the right syntax for all columns name from Host Monitor log file.
Thank you. I
Old macro variables (supported by HostMonitor 1.xx and 3xx): http://www.ks-soft.net/hostmon.eng/actions.htm#macro
New macro variables (version 3.xx only): http://www.ks-soft.net/hostmon.eng/news.htm#NewCol
But if the program does not insert any records into your table, it means you SQL server doesn't like SQL query. Use "Test" button (beside SQL query field in the Options dialog) to see answer from SQL server.
Also make sure you use ('') for text fields like '%TaskComment%', '%Status%'.
Regards
Alex
New macro variables (version 3.xx only): http://www.ks-soft.net/hostmon.eng/news.htm#NewCol
But if the program does not insert any records into your table, it means you SQL server doesn't like SQL query. Use "Test" button (beside SQL query field in the Options dialog) to see answer from SQL server.
Also make sure you use ('') for text fields like '%TaskComment%', '%Status%'.
Regards
Alex