Sunday, 15 April 2012

Unexpected end of file while parsing Name has occurred. Line 1, position 2048.

This SQL 2008 error occured when I tried to read XML using the executeXmlReader() method.

Turned out that it reads in chunks of 2KB or 2048 bytes. So if you close the database connection before using the resulting reader then you will only get those first 2KB.

Leave your SQL database connection open while using the reader and only close it after this.

1 comment:

  1. SAP Business One is a single application that integrates core business functions across your entire company SAP Business One Integration. Integrate any and all applications with SAP Business One.