cancel
Showing results for 
Search instead for 
Did you mean: 

Communication Error when generating XML using CDATA in SQL Anywhere V10

Former Member
0 Kudos

Hi Gurus,

We are using SQLA10 and in one of the functionalities we generate XML using FOR XML EXPLICIT.

We are using CDATA directive for some columns and when the value is NULL, SQLA10 Engine stops and throw "Communication Error".

This is know if anyone faced a similar problem and fixed this issue at DB Engine level. There is a workaround we have is to put '' id the value is NULL but that is just a workaround.

Below is the code which can be tried..

Create table Customer
( "emp_ID" int default autoincrement,
"emp_Name" char(50),
"emp_age" int,
"emp_status" char(1)
)

insert into Customer ("emp_Name","emp_age","emp_status") values ('Ram',32,'A')
insert into Customer ("emp_Name","emp_age") values ('test',32)
insert into Customer ("emp_Name","emp_status") values ('test1','A')


SELECT
1 AS tag,
NULL AS parent,
emp_name AS [Employe_name!1!emp_name],
emp_age AS [emp_age!1!!cdata]
FROM customer
FOR XML EXPLICIT;

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I could reproduce this with the GA versions of 10.0.1. The communication error
is due to the database server crashing. Further testing indicated it clears up with
later EBFs.

I suspect this was fixed by change# 658114 which is included in many available
(archived) EBFs for 10.0.1 (all with builds >= 2563 should have this).

================(Build #2563 - Engineering Case #658114)================
The server would have crashed if a SELECT statement useed the FOR XML EXPLICIT clause, and a null value was used for the CDATA directive. This has been fixed

Answers (0)