SQL query failed

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

SQL query failed

Post by Nadir »

Hi all,

I have a problem with sql query test
Insert into AHM (Host,TestName ,DateTime ,Reply ,Status ,TestMethod,TestId)
VALUES ('%FCommentLine1%', '%TestName%', '%Date%', '%Reply%',
'%Status%', '%TestMethod%', '%TestId%')
It's return
the conversion of a char data type to a datetime data type resulted in an out-of-rage datetime value
I don't understand this error, I think variables types are good
(<Host, varchar(50),>
,<TestName, varchar(50),>
,<DateTime, datetime,>
,<Reply, float,>
,<Status, varchar(20),>
,<TestMethod, varchar(50),>
,<TestId, int,>)
I use SQL EXPRESS 2005 on Win 2003 Server SP1 US
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: SQL query failed

Post by KS-Soft Europe »

Nadir wrote:
Insert into AHM (Host,TestName ,DateTime ,Reply ,Status ,TestMethod,TestId)
VALUES ('%FCommentLine1%', '%TestName%', '%Date%', '%Reply%',
'%Status%', '%TestMethod%', '%TestId%')
It would be better to use %DateTime% variable instead of %Date%
Nadir wrote:It's return
the conversion of a char data type to a datetime data type resulted in an out-of-rage datetime value
I don't understand this error, I think variables types are good
Yes, variables types are good, but dates format might be a bit different.

To figure it out I can suggest you set "Fixed date&time format" option (Options > Misc > Date&Time format) and select value "MM/dd/yyyy" for Date Format and "hh:mm:ss AMPM" for Time Format. Such configuration must work with MS SQL 2005 without additional conversions.

Regards,
Max
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

Thanks Max it's work!!
But when Advanced Logs options were configured with the sql query,how can I do for that all tests recods in database every perform test?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Nadir wrote:But when Advanced Logs options were configured with the sql query,how can I do for that all tests recods in database every perform test?
Sorry, I do not understand the question. Could you explain more clear?

Regards,
MAx
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

Why all tests don't records in database when I configured ODBC logs settings?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Nadir wrote:Why all tests don't records in database when I configured ODBC logs settings?
It depends on "Default logging mode" option (that is specified on Logs Settings page in the Options dialog).

Regards,
Max
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

I choose
saved information about every performed test
but no logs in database?
I have forget sometimes? How to tell HM records all test in database?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Nadir wrote:I have forget sometimes? How to tell HM records all test in database?
Yes. Something wrong. Could you check the system log file(specified on Options>Log Settings tab)? Any ODBC Errors?

Regards,
Max
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

No ODBC errors!!

Could you tell me if I configured ODBC settings option and if query tests works --> all test must records on database no?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Nadir wrote:Could you tell me if I configured ODBC settings option and if query tests works --> all test must records on database no?
Yes, in such case information for all tests should record into database. Try to push "Refresh" button on HM toolbar manualy.

Regards,
Max
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

I refresh, restart HM, restart server but no logs in tables.
When I pust test in Advanced logs settings I have just one log
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May we see your settings? Send hostmon.ini file to support@ks-soft.net

Regards
Alex
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

Ok
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Nadir wrote:,<Reply, float,>
I do not think you should use numeric field for Reply, because of Reply might become not numeric values (e.g. Reply = "480 ms"). You should use Reply_Number or Reply_Integer variables instead.

Regards,
Max
Nadir
Posts: 264
Joined: Mon Aug 29, 2005 2:01 am

Post by Nadir »

Yes I modified type of reply variable.
Do you find the probem in Hostmon.ini
Post Reply