select dbo.xp_write_file('c:\\xmlfile.xml', (select xmlData from
"DBA"."sp_getxmlData"(1, 770280)));
Internal database error *** ERROR *** Assertion failed: 101412 (9.0.2.3778)
Page number on page does not match page requested -- transaction rolled back
[Sybase][ODBC Driver][SQL Anywhere]Internal database error *** ERROR ***
Assertion failed: 101412 (9.0.2.3778)
Page number on page does not match page requested -- transaction rolled back
Error code=-301
SQL state=HY000
Connection parameters:
User=dba
Password=***
LINKS=all
I can avoid the error by using a variable
begin
declare @xmlData long binary;
select xmlData
into @xmlData
from "DBA"."sp_CliniflowPatientExport"(1, 770280);
select dbo.xp_write_file('c:\\bob.xml', @xmlData);
end
The fix would be to generate a syntax error, however. SQL Anywhere does
not support passing query expressions as parameters to stored procedures
or functions, in any context. The use of the variable (as below) is the
"correct" way to code this.
Glenn
--
Glenn Paulley
Director, Engineering (Query Processing)
Sybase iAnywhere
Blog: http://iablog.sybase.com/paulley
EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all
To Submit Bug Reports: http://case-express.sybase.com
SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288
Whitepapers, TechDocs, and bug fixes are all available through the
Sybase iAnywhere pages at
http://www.sybase.com/products/databasemanagement/sqlanywhere/technicalsupport