FullPath var
FullPath var
When I use the fullpath var in a mySQL query (ODBS) is doesn't work.
All other variables work fine. Is this a known bug?
Regards,
Hanno
All other variables work fine. Is this a known bug?
Regards,
Hanno
I figured it out. It is a mySQL "problem". Using MS SQL it works fine.
FYI:
I used the FullPath var in a ODBC connection to the mySQL database in advanced logging with the latest version of the Host Monitor.
Insert into hmlog (eventdatetime, testname, status, AlertThreshold, klant, method, reply) VALUES ('%DateTime%', '%TestName% ', '%SimpleStatus%', '%AlertThresHold%', '%FullPath%', '%TestMethod%', '%Reply%')
Test given an error and after that the logging doesn't work (obviously).
Thanks,
Hanno
FYI:
I used the FullPath var in a ODBC connection to the mySQL database in advanced logging with the latest version of the Host Monitor.
Insert into hmlog (eventdatetime, testname, status, AlertThreshold, klant, method, reply) VALUES ('%DateTime%', '%TestName% ', '%SimpleStatus%', '%AlertThresHold%', '%FullPath%', '%TestMethod%', '%Reply%')
Test given an error and after that the logging doesn't work (obviously).
Thanks,
Hanno
It could be problem with backslash on end of string of FullPath.Hanno wrote:I figured it out. It is a mySQL "problem". Using MS SQL it works fine.
FYI:
I used the FullPath var in a ODBC connection to the mySQL database in advanced logging with the latest version of the Host Monitor.
Insert into hmlog (eventdatetime, testname, status, AlertThreshold, klant, method, reply) VALUES ('%DateTime%', '%TestName% ', '%SimpleStatus%', '%AlertThresHold%', '%FullPath%', '%TestMethod%', '%Reply%')
Test given an error and after that the logging doesn't work (obviously).
Thanks,
Hanno
But I got another problem with FullPath
HostMonitor 5.92
ODBC MySQL ODBC 3.51 or Mysql Connector/ODBC v5
MySQL Server 5.0.20a
When I try to log into DB I become FullPath without \ (backslashes).
What I need to do to save it correctly?
Thanks for Answer.
OK,KS-Soft wrote:I am afraid \\ will not work for MS SQL, so there is no universal solution.
We have to implement some options (switches) for different servers...
Regards
Alex
Could you post me what exaclty you send in variable %FullPath%?
When I create function for escaping chars from \<char> to \\<char>
I didn't become correct result. It escape every char.
thx
Done. Version 6.00 available at http://www.ks-soft.net/hostmon.eng/downpage.htm
Use ODBC_UseDoubleSlash option
http://www.ks-soft.net/hostmon.eng/news.htm
Regards
Alex
Use ODBC_UseDoubleSlash option
http://www.ks-soft.net/hostmon.eng/news.htm
Regards
Alex
Great.
I have downloaded and tested.
Problem
But if you have example testname "CPU \\server 1", will be logged only "CPU \server 1". That could be not a bug but feature (clothesed bug).
I hope, if you have in variable allready 2 \ behind you dont replace this, you replace only single \.
I have downloaded and tested.
Problem
It replace in variable %FullPath% correctly, it's GREAT."Undocumented" ODBC_UseDoubleSlash option directs HostMonitor to replace \ (back slash) with \\ in every variable used in SQL query. This may be necessary for some SQL servers, e.g. MySQL 5.0.
"Undocumented" means that the option is not accessible thru GUI and you should add "ODBC_UseDoubleSlash=1" line into [Misc] section of hostmon.ini file.
But if you have example testname "CPU \\server 1", will be logged only "CPU \server 1". That could be not a bug but feature (clothesed bug).
I hope, if you have in variable allready 2 \ behind you dont replace this, you replace only single \.