ODBC query in 9.00 compare not numeric?

When you post information about some problem, please include the following details: - OS version (e.g. Windows 2000 Professional SP3); HostMonitor version; problem description.
Post Reply
step
Posts: 19
Joined: Thu Apr 20, 2006 3:13 pm
Location: Berlin, GER

ODBC query in 9.00 compare not numeric?

Post by step »

Alex,

since i do update to 9.00 i have problems with some ODBC querys.

An example:

Code: Select all

select top 1 value  from perfSampleRt where instance_id = 43 and counter_id = 5 order by timestamp desc
This request gives an integer value, is the result e.g. 800 and to compare with < 2000 then the test is red. When the result compared with < 99, the test is green.

Results are now, since version 9.00, compared as text - is that intentional?

Best regards.
Step
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We did not change anything related to ODBC test in version 9.00. I just re-checked this...
And as I see HostMonitor compares numeric fields as numbers, not strings.

May be you have updates your ODBC driver as well or changed table structure?
What exactly ODBC driver do you use?
What exactly field type?
Can you try to use CAST operator in SQL Query to change value type?

What version of HostMonitor have you used before update?

Regards
Alex
step
Posts: 19
Joined: Thu Apr 20, 2006 3:13 pm
Location: Berlin, GER

Post by step »

KS-Soft wrote:We did not change anything related to ODBC test in version 9.00. I just re-checked this...
And as I see HostMonitor compares numeric fields as numbers, not strings.
Hmm...
May be you have updates your ODBC driver as well or changed table structure?
No, no...
What exactly ODBC driver do you use?
What exactly field type?
Can you try to use CAST operator in SQL Query to change value type?
What version of HostMonitor have you used before update?
The data type from column value is bigint. Do I use "cast ... as int" - of course, it works. Except the update, nothing has changed on my servers. The last used HM-version was 8.86, updated on 18 march 2011. Since it went without implementation with cast. The last server reboot was executed on 18 october - at the time there were no problems. Yesterday I only upgraded HM from version 8.86 to version 9.00. Other systems were not changed during this time.

Is it possible that had in the handling of bigint changed anything?

Regards
Step.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

That was our mistake :oops:
We did not change ODBC related code at all but one module was rebuilt with wrong option.

There is quick fix: www.ks-soft.net/download/hm900c.zip
Just unzip the file and replace hostmon.exe module.

Regards
Alex
step
Posts: 19
Joined: Thu Apr 20, 2006 3:13 pm
Location: Berlin, GER

Post by step »

Thanks for the quick reaction.

Regards
Step.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are welcome.
Also we found couple pretty old minor bugs so expect version 9.02 tomorrow

Regards
Alex
step
Posts: 19
Joined: Thu Apr 20, 2006 3:13 pm
Location: Berlin, GER

Post by step »

Very fine, thanks.
Post Reply