Hi all,
I have the following 4GL codes:
LET str = "INSERT INTO ", local_path, ":table1",
" VALUES ('", client_name, "' "
PREPARE qid FROM str
EXECUTE qid
It executes perfectly. However, when there is a single quote (') in "client_name" variable, Syntax Error would occur.
For example,
if client_name = "King's Name",
str = INSERT INTO db@dbtcp:table1 VALUES ('King's Name')
The system would take "King" as the first input field, and the subsequent "s Name'" as invalid syntax.
I need to know is there any way to resolve the above problem. It is urgent. Thank you very much.
Rgrds,
TTKong
I have the following 4GL codes:
LET str = "INSERT INTO ", local_path, ":table1",
" VALUES ('", client_name, "' "
PREPARE qid FROM str
EXECUTE qid
It executes perfectly. However, when there is a single quote (') in "client_name" variable, Syntax Error would occur.
For example,
if client_name = "King's Name",
str = INSERT INTO db@dbtcp:table1 VALUES ('King's Name')
The system would take "King" as the first input field, and the subsequent "s Name'" as invalid syntax.
I need to know is there any way to resolve the above problem. It is urgent. Thank you very much.
Rgrds,
TTKong