on 2012 Oct 09 6:44 AM
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:
User | Count |
---|---|
68 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.