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
       ErrorCode=-2147467259
       NativeError=-668
       StackTrace:
            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 (12.0.1.3742) 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

OBR
26691020
accept rate: 0%

edited 15 Mar '13, 21:10

Mark%20Culp's gravatar image

Mark Culp
23.2k9132272

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×65
×63
×18
×2

question asked: 09 Oct '12, 05:44

question was seen: 1,358 times

last updated: 15 Mar '13, 21:10