ODBC loggin, need a little help please

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
_corebusiness_
Posts: 5
Joined: Wed May 21, 2003 6:00 pm
Location: Denmark
Contact:

Post by _corebusiness_ »

OS: windows 2000 sp3
HM: version 3.68

I was setting up logging to a SQL database, and i have created an appropriate table etc, everything is fine, but:

The macro variables:
%AliveRatio% %DeadRatio% and %UnknownRatio%
returns a value wich is seperated by commas (ie. 91,00 or 0,00 or 20,00 etc). This gives me a problem when i try to store the value for one of the 3 macro variables as a number (either float, int etc.)

Lets say I want to store 3 values, the variables used in my sql query would actually return 6 values seperated by commas : 91,00, 00,00, 20,00 instead of 91.00, 00.00, 20.00 (3 values).

I have changed my regional settings and made sure that all seperators used by the systes are "." and not ","

Is it possible to either get a rouded value from %AliveRatio% %DeadRatio% and %UnknownRatio% or get a value seperated by something else than a comma ?

If not, well then i would have to store the values as text, or strip the last 3 chars before storing.

Any suggestions?

Best regards
Rasmus Jensen, CORE Business.
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

Surround the macro's with ""
_corebusiness_
Posts: 5
Joined: Wed May 21, 2003 6:00 pm
Location: Denmark
Contact:

Post by _corebusiness_ »

that would still return a value containing comma, where the regional setting of the sql server would have expected a value seperated by a dot ?

so the value returned would not fit as "int" or "float" field ?

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

Post by KS-Soft »

>I have changed my regional settings and made sure that all seperators used by the systes are "." and not ","

After this you should restart HostMonitor. And problem will be solved.

Regards
Alex
_corebusiness_
Posts: 5
Joined: Wed May 21, 2003 6:00 pm
Location: Denmark
Contact:

Post by _corebusiness_ »

It works,

As usual fast and clear responses, thank you!


Locked