I am trying to read a date field on the form and then trying to see if it exists in an Aux table. If it exists in the Aux table, we define this as being in a freeze period. However, when the Aux table is trying to be read with a ReadWithWhere(whereClause) I get the error.
th section of the script that is causing the error is here:
call ext.setCompatibilityVersion(7,0)
~~
~~
if (IssueType = 15 or IssueType = 16 or IssueType = 17) and (TransitionID = 4 or TransitionID = 28 or TransitionID = 88 or TransitionID = 144) or TransitionID = 119 or TransitionID = 106 then
fldOK = Shell.Item.GetFieldValue("Target Date" , intTargetDate)
shell.redomessage="we have a freeze date find :: " & "Target date is " & intTargetDate
tableId = "1015" ' Freeze Date
Set myRecord = Ext.CreateAppRecord(1015)
whereClause = "TS_FREEZE_DATE = " & intTargetDate
if myRecord.ReadWithWhere(whereClause) Then
fldOK = Shell.Item.SetFieldValue("Exception Required" , "1")
fldOK = myRecord.GetFieldValue("Freeze Date End", intFDEnd)
fldOK = Shell.Item.SetFieldValue("Exception Expiration Date" , intFDEnd)
else
fldOK = Shell.Item.SetFieldValue("Exception Required" , "0")
fldOK = Shell.Item.SetFieldValue("Exception Approved" , "0")
intFDEnd = ""
fldOK = Shell.Item.SetFieldValue("Exception Expiration Date" , intFDEnd)
end if
end if
The error message is below:
The record with the 'select U_FREEZE_DATES.TS_ID, U_FREEZE_DATES.TS_UUID, U_FREEZE_DATES.TS_TITLE, U_FREEZE_DATES.TS_FREEZE_DATE, U_FREEZE_DATES.TS_APP_FREEZE_TYPE, U_FREEZE_DATES.TS_FREEZE_DATE_END, U_FREEZE_DATES.TS_DESCRIPTION from U_FREEZE_DATES where TS_Freeze_Date = 2010-11-16T00:00:00+00:00' select statement could not be read in the 'Freeze Dates' database table.
(TTexcIDS_EXC_CANNOT_READ_RECORD_WITH_SELECT_STMT)
Incorrect syntax near '00'.
Do I need to convert to Integer and query that?
No comments:
Post a Comment