Invalid XML character (Unicode: 0x10) was found in the CDATA

Running on v7.6.2 based on Windows Server 2008 SP2, connected to SQL2012

If I comment out the line that I have isolated by itself, the query works fine - it’s just when that one line is active in the rest of the query that I get the fault listed at the end of this quote

code from query follows after quote

[quote]java.lang.Exception: Error running query:
SQLQuery(query=SET NOCOUNT ON
DECLARE @EID int = 19

select top 100 [Verify_Package_Data].[Index],
[Verify_Package_Data].[Ship_BC] AS “Label Code”,
[Verify_Package_Data].[ScaleSP] AS “sp00”,
[Verify_Package_Data].[ScaleScanBox] AS “Box DimCode”,
–[Scale_Grades].[Weight] AS (cast(’[Scale_Grades].[Weight]’, float(6))*(convert(float(6),0.001))) “Weight”,
[Scale_Grades].[Weight] AS “Weight”,

–(cast([Scale_Grades].[Weight] AS float(8)) * 0.001) as “Weight2”,

(convert(int, [Scale_Grades].[Weight]) * 0.001) as “Weight2”, – Might work, but appears to cause XML parse error on data returned from query

[Verify_Package_Data].[KO_Code] AS “KO Reason Code”,
[Verify_Package_Data].[PackType] AS “1 = Flat, 0 = Ship”,
[Verify_Package_Data].[AvgHeight1] AS “Height 1”,
[Verify_Package_Data].[AvgHeight2] AS “Height 2”,
[Verify_Package_Data].[ExceededSlope] AS “Excess Slope”,
[Verify_Package_Data].[PositionError] AS “Position Error”
from [Verify_Package_Data]
join [Scale_Grades]
on [Scale_Grades].SPOO_BC = [Verify_Package_Data].ScaleSP
where @EID = [Verify_Package_Data].[EID]
order by [Verify_Package_Data].[t_stamp] desc
, database=OEE)@5000ms
On: SLAM_Operator_New.Root Container.tbl_Package 1.Try2
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:316)
at java.lang.Thread.run(Unknown Source)
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway.
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:313)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:416)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:249)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:244)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.runLimitQuery(GatewayInterface.java:712)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.runQuery(GatewayInterface.java:676)
at com.inductiveautomation.factorypmi.application.gateway.SQLQuery.execute(SQLQuery.java:48)
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.execute(QueryManager.java:690)
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$Query.access$500(QueryManager.java:663)
at com.inductiveautomation.factorypmi.application.gateway.QueryManager$QueryExecutor.run(QueryManager.java:314)
… 1 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 96; An invalid XML character (Unicode: 0x10) was found in the CDATA section.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:414)
… 9 more

Ignition v7.6.2 (b2368)
Java: Oracle Corporation 1.7.0_25
[/quote]

[code]SET NOCOUNT ON
DECLARE @EID int = {Root Container.dpd_SLAM_Line.selectedValue}

select top 100 [Verify_Package_Data].[Index],
[Verify_Package_Data].[Ship_BC] AS “Label Code”,
[Verify_Package_Data].[ScaleSP] AS “sp00”,
[Verify_Package_Data].[ScaleScanBox] AS “Box DimCode”,
–[Scale_Grades].[Weight] AS (cast(’[Scale_Grades].[Weight]’, float(6))*(convert(float(6),0.001))) “Weight”,
[Scale_Grades].[Weight] AS “Weight”,

–(cast([Scale_Grades].[Weight] AS float(8)) * 0.001) as “Weight2”,

(convert(int, [Scale_Grades].[Weight]) * 0.001) as “Weight2”, – Might work, but appears to cause XML parse error on data returned from query

[Verify_Package_Data].[KO_Code] AS “KO Reason Code”,
[Verify_Package_Data].[PackType] AS “1 = Flat, 0 = Ship”,
[Verify_Package_Data].[AvgHeight1] AS “Height 1”,
[Verify_Package_Data].[AvgHeight2] AS “Height 2”,
[Verify_Package_Data].[ExceededSlope] AS “Excess Slope”,
[Verify_Package_Data].[PositionError] AS “Position Error”
from [Verify_Package_Data]
join [Scale_Grades]
on [Scale_Grades].SPOO_BC = [Verify_Package_Data].ScaleSP
where @EID = [Verify_Package_Data].[EID]
order by [Verify_Package_Data].[t_stamp] desc
[/code]

I would recommend trying to run that query directly in SQL Server so you can look at the return values, and check to see if there are any strange characters in there. If that is the case it would be very helpful to have a screen shot of the result.