1
response

Please help me with the character string transfer format.
I need to pass a character string to an external program.
I do it like this:

<Extension exec>
Module xm_exec
</Extension>

<Output to_db_repldata_access_log>
Module om_null
EXEC exec('c:\Windows\System32\cmd.exe','/U','/C','C:\Tools\NXLog\log_access_insert.bat', $Access_Resource);
</Output>

When the $Access_Resource field contains a character string without spaces, such as 'qwerty',
then the string is passed without quotes, just qwerty

When the $Access_Resource field contains a character string with spaces, such as 'qwer ty',
then the string is passed in double quotes - "qwerty"

Questions:
1. How to unify the way the string is passed, either always in double quotes or always without quotes?
2. Is it possible to configure the transmission of the string always in single quotes?

AskedJanuary 21, 2022 - 10:46am

Comments (1)

Answers (0)