本文介绍了传递给函数时,如何在Inno Setup中包含单引号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在函数中使用了字符串,如下所示.
I have used string in a function as follow.
我正在将一个字符串传递给特定的函数,如果该字符串在中间带有单引号,则该字符串会中断.如何在Inno Setup Pascal脚本中包含单引号?
I'm passing a string to a particular function, if that string has single quotes inside middle it's breaking. How to include single quotes in Inno Setup Pascal scripting?
TempReadValue(StrArray, 'log4j.appender.testing.File=INSERT INTO emp select Eid,'%K','%L'from DistributionTable whereEname = 'Nails:chino'', LogFileName);
传递给函数时,直到%K
为止,然后中断.有人可以指导我如何读取/传递整个字符串,直到Nils:chino
吗?
When passing to function its taking till %K
, after that its breaking. Can anybody guide me how to read/pass entire string till Nils:chino
?
感谢您的帮助.
推荐答案
尝试以下方法:
TempReadValue(StrArray, 'log4j.appender.testing.File=INSERT INTO emp select Eid,'+Chr(39)+'%K'+Chr(39)+','+Chr(39)+'%L'+Chr(39)+'from DistributionTable whereEname = '+Chr(39)+'Nails:chino'+Chr(39), LogFileName);
这将起作用.
这篇关于传递给函数时,如何在Inno Setup中包含单引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!