Try with a TOP clause to see if that makes it work.
I only get 2033 characters
Is that the size of the temp.xml file on disk?
I wouldn’t save the file to c:\ as later versions of Windows can get stroppy creating files in the root folder - use BlobToFile(SQL:DATA,path() & ‘\temp.xml’) instead
See attached for example that I’ve used to retrieve 700MB XML fragments.
XMLBlob.clw (1.5 KB)
Few things to note…
1 - Dummy file doesn’t need the TURBOSQL switch because BLOB fields are outside of the RECORD declaration - so Clarion doesn’t send verification commands to the backend to check if the field is present and of the correct datatype
2 - Using Prop:SQLRowSet avoids the need for a stored procedure on the backend
3 - Note how the SQL command CASTs the Unicode text to ASCII, adds a processing instruction, valid root start and termination etc