Microsoft Fixes Character-String Problem in SQL Server CE

Microsoft has released a hotfix for a problem that occurs when you define a range by using strings that have more than two characters. In a SQL Server 2000 Windows CE Edition (SQL Server CE) OLE DB application, when you define a range to restrict rows that you access from a table and you access data from the table, the application returns incorrect results. Also, when you verify results, you can see that the first two characters of the string values define the range. This problem occurs if you use strings that have more than two characters to define the range, you bind the range data string as the DBTYPE_WSTR OLE DB data type, and you use the SetRange method of the IRowSetIndex interface to restrict the range of rows that you access. The OLE DB Provider for SQL Server CE can't detect the DBTYPE_WSTR OLE DB data type that the SQL Server CE OLE DB application passes. Therefore, the OLE DB Provider for SQL Server CE uses the fixed length of four bytes to bind data. Four bytes equals two characters in the WCHAR data type. To find out more about this problem and the supported hotfix, read the Microsoft article "FIX: You receive incorrect results when you use strings that have more than two characters to define a range, and then you access data in a SQL Server CE OLE DB application" at

   http://support.microsoft.com/?kbid=883576

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish