" & \
> "'[[tmaternalocc]]', '[[tmaternalage]]', '[[tsite]]',
> '[[tmaternalchart]]', '[[tcareprovider1]]', '[[tcareprovider2]]',
> '[[tcareprovider3]]', '[[tnote]]')") into tCmd
>
> W
eal with
all of this is definitely the way to go.
-- Mark
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/database-write-error-tp4343759p4346808.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
]', '[[tsite]]',
> '[[tmaternalchart]]', '[[tcareprovider1]]', '[[tcareprovider2]]',
> '[[tcareprovider3]]', '[[tnote]]')") into tCmd
>
> Wouldn't replacing the single quotes with double quotes mess up the merge
&g
;[[tcareprovider2]]',
'[[tcareprovider3]]', '[[tnote]]')") into tCmd
Wouldn't replacing the single quotes with double quotes mess up the merge
command (ie. it would not know where the string beings/ends??) Or can you
replace the "outer
does have its challenges.
Thanks again for the great suggestions.
-- Mark
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/database-write-error-tp4343759p4345697.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
Two different topics here, I think, - escaping single (and double) quotes
and sql injection. Both appear to be solved with the revExecuteSQL
substitution.
If you don't use revExecuteSQL solution then there's two choices for
escaping. SQL accepts either single or double quotes to enclose literals.
gt; '[[tmaternalmhsc]]', " & \
> "'[[tmaternaldob]]', [[tcareprovider]]', '[[tnote]]')") into tCmd
> revExecuteSQL gConnectID, tCmd
>
> Thanks
> -- Mark
>
>
> --
> View this message in context:
&
On 31/01/2012 12:32, Len Morgan wrote:
Apostrophe is a reserved character in SQL so you'll have to escape it.
If you take the part of your INSERT statement that has the field with
the apostrophe in it and "expand" the variable (i.e., write it in with
the *contents *of the variable instead (e.g.,
Apostrophe is a reserved character in SQL so you'll have to escape it.
If you take the part of your INSERT statement that has the field with
the apostrophe in it and "expand" the variable (i.e., write it in with
the *contents *of the variable instead (e.g., INSERT
.,'[[globaldata] ]' becom
re_provider, note)" & \
>> merge("VALUES ('[[globaldate]]', '[[tmaternalname]]', '[[tmaternalphin]]',
>> '[[tmaternalmhsc]]', " & \
>> "'[[tmaternaldob]]', [[tcareprovider]]', '[[tnote]]
uot;VALUES ('[[globaldate]]', '[[tmaternalname]]', '[[tmaternalphin]]',
> '[[tmaternalmhsc]]', " & \
> "'[[tmaternaldob]]', [[tcareprovider]]', '[[tnote]]')") into tCmd
> revExecuteSQL gConnectID, tCmd
>
> Thank
uot;) into tCmd
revExecuteSQL gConnectID, tCmd
Thanks
-- Mark
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/database-write-error-tp4343759p4343759.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
12 matches
Mail list logo