Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

Using EF SQL Anywhere Data Provider a linq query fails on retrieving data from a proxy table. It only fails if the query results in more than one rows.

  InnerException: iAnywhere.Data.SQLAnywhere.SAException
       Message=Cursor is restricted to FETCH NEXT operations
       Source=SQL Anywhere .NET Data Provider
            at iAnywhere.Data.SQLAnywhere.SADataReader.Read()
            at System.Data.Common.Internal.Materialization.Shaper`1.StoreRead()

Both the databases (the one in which the query is run and the remote server) are SA12 ( databases. If I copy the proxy table (structure and data) and replace it as an ordinary table, the query is run with success.

This leads me towards the issue being with the EF data provider which turns the query to a cursor declaration which fails.

Linq Query:

var obPersonFiles = (from files in sybaseModel.OB_PERSON_FILE
                      where files.EMPLOYMENT_SEQ == employmentSeq && files.DOCUMENT != null
                     select files).ToList();

Table structure:

alt text

asked 09 Oct '12, 05:44

OBR's gravatar image

accept rate: 0%

edited 15 Mar '13, 21:10

Mark%20Culp's gravatar image

Mark Culp

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 09 Oct '12, 05:44

question was seen: 2,937 times

last updated: 15 Mar '13, 21:10