Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Fred91
2011-09-07T13:44:27Z
Hello,

I'm trying to log errors in a MySQL database, but I have a problem with the use of {STRING(Replace,... with the StdErr variable.

I'm using it to double the single quotes.

Here is a working function (I also tried with log to file notification):
{STRING(Replace,hel'lo,','')}

Which displays hel''lo

And here a function which is not working when my task returns an error (from a vbs script)
{STRING(Replace,{TASK(Active,StdErr)},','')}

It says "Error in argument" instead of displaying the error message.
I think it can be an encoding error of StdErr because in the VisualCron client, the french characters are written with small squares.

C:\TEMP\test.vbs(2, 1) Erreur d'ex�cution Microsoft VBScript: Division par z�ro

I changed the encoding in the Main Settings of the task from utf-8 to iso8859-1 ou windows-1250 whithout success.

Do you have any idea on how to solve this problem ?

Thanks for your help,

Regards,

Fred
Sponsor
Forum information
Support
2011-09-14T18:12:36Z
The problem is that there is a comma in your output. Try changing parameter delimiter to pipe | instead like:

{STRING(Replace|{TASK(Active,StdErr)}|'|'')}


Also, for encoding try normal ascii as this is probably what vbs outputs.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Fred91
2011-09-15T06:59:03Z
Thank you very much for your answer. It's working fine now using a pipe instead of a coma.

Finally, the problem wasn't coming from encoding, but from the fact that my string contained a coma.

However, I didn't manage to have a correct encoding but at least the error is logged 😎 .

Regards,

Fred
Scroll to Top