escapeSQL inserting double single quotes

Hey there,
So I know this didn’t use to do this. But the escapeSQL is causing an insertion of double single quotes into the database. I could have set it up wrong but I did not do anything different then what is normally done. I have two text fields both of them have their text set to escapeSQL with a custom property. One tables data is queried from the database, then the ability to edit and save it is set up. The second text field has a static template set up to it. Editing to that is done then saved, I go through and check to see if there is already a field saved in the database and if there is I display the SQL field if not I display the template field. This worked properly before I set up the template part of it. Any suggestions on how to not have this double single quote problem?

can you post your code so we can check it out?

This is what will trigger the save event.

[code]"""
Saves Run Summary
“”"

lineID = event.source.parent.getComponent(‘Top Bar’).getComponent(‘Production Line’).selectedLineID
wo = event.source.parent.getComponent(‘Top Bar’).selectedWO
batch = event.source.parent.getComponent(‘Top Bar’).selectedBatch
summary = event.source.parent.summaryToSave

Insert run summary

query = “”“EXEC updateBatchSummary ?, ?, ?, ?;”""
values = [lineID,wo,batch,summary]
system.db.runPrepUpdate(query,values,“MES_Runtime”)[/code]

This is the custom property that detects which text field to grab it from, and if i escape sql here, it will double input the apostrophes.

if({Root Container.hasSummary} = 1,
{Root Container.Summary.text},
{Root Container.Summary Template.text})

Here is the SQL code that gets ran.

[quote]USE [MES_Runtime]
GO
/****** Object: StoredProcedure [dbo].[updateBatchSummary] Script Date: 04/09/2014 15:47:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[updateBatchSummary](
@LineID INT,
@WO INT,
@Batch INT,
@Summary nvarchar(MAX))
AS

BEGIN
– SET NOCOUNT ON added to prevent extra result sets from
– interfering with SELECT statements.
SET NOCOUNT ON;

MERGE INTO BatchSummary AS Target
USING (VALUES(@LineID,@WO,@Batch)) AS Source (LineID,WO,Batch)
ON (Target.[LineID] = Source.[LineID] AND Target.[WO] = Source.[WO] AND Target.[Batch] = Source.[Batch])
WHEN MATCHED THEN
UPDATE SET Target.[Summary]=@Summary, Target.[Timestamp]=GETDATE()
WHEN NOT MATCHED THEN
INSERT (LineID,WO,Batch,Summary,Timestamp) VALUES (@LineID,@WO,@Batch,@Summary,GETDATE());

END
[/quote]

According to the user manual:

escapeSQL

So I guess you uncovered a bug that was fixed or something.

If I put in the escape sql, it wont work properly. if I leave it out, like I did in the code posted it all works fine. So I am not sure if it is getting done in another place also.