When you use the SQLSetPos function call to run a common table expression (CTE) query to retrieve spatial data, the function call can't set the cursor position, and you receive an "Invalid cursor position" error message. This problem occurs in Microsoft SQL Server 2014 and Microsoft SQL Server 2012.
The issue was first fixed in the following cumulative update of SQL Server:
Recommendation: Install the latest cumulative update for SQL Server
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. We recommend that you download and install the latest cumulative updates for SQL Server:
Microsoft scanned this file for viruses by using the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to it.
There are no prerequisites for installing this update.
To install this hotfix, you don't have to make any changes to the registry.
You may have to restart the computer after you install this hotfix.
Hotfix replacement information
This hotfix doesn't replace a previously released hotfix.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.