FIX: "Invalid cursor position" error when you retrieve spatial data by using SQLSetPos in SQL Server 2014 or SQL Server 2012

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:

Note You can find information about the latest SQL Server builds from Where to find information about the latest SQL Server builds.

Hotfix information

Download Center

A hotfix update to resolve this problem is available for manual download and installation from the Microsoft Download Center.

Virus-scan claim
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.

Registry information

To install this hotfix, you don't have to make any changes to the registry.

Restart requirement

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.

Article ID: 3100451 - Last Review: 05/31/2016 06:22:00 - Revision: 6.0

Microsoft SQL Server 2014 Service Pack 1, Microsoft SQL Server 2012 Service Pack 3, Microsoft SQL Server 2014 Developer, Microsoft SQL Server 2014 Enterprise, Microsoft SQL Server 2014 Standard

  • kbfix kbqfe kbexpertiseadvanced kbsurveynew atdownload KB3100451