Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi, I am experiencing a strange error while using SQL Anywhere .NET Framework provider with OData. I created a Web API application that exposes a standard OData GET query. Everything works fine using a simple api call like:

GET http://<ip>:<port>/odata/EOrder

It crashes when using:
http://<ip>:<port>/odata/EOrder?$select=<column list="">
Basically it seems failing every time I use some OQuery options.

It produces the following error

Message: "Cannot convert 'e4b8a7a6-d7c5-4adf-99ed-8bb046c3c8...' to integer"
Source: "SQL Anywhere .NET Data Provider"

Stacktrace
   at Sap.Data.SQLAnywhere.SACommand._ExecuteReader(CommandBehavior commandBehavior, Boolean isExecuteScalar, Boolean isBeginExecuteReader)
   at Sap.Data.SQLAnywhere.SACommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

asked 27 Oct '20, 05:10

Luigi68217's gravatar image

Luigi68217
11112
accept rate: 0%

edited 27 Oct '20, 07:45

Vlad's gravatar image

Vlad
2.5k91127

Do you have more information about the issue? E.g. table, schema, sample data, $metadata, how web service is designed, anything?!

If not, I suggest you to enable SQL traces and analyze logs. E.g. here https://sqlanywhere-forum.sap.com/questions/19508/how-to-logtrace-sql-statements or here: (-zr level) http://dcx.sap.com/sqla170/en/html/3bc8723c6c5f10149da5dc2f3b74259d.html

(30 Oct '20, 08:10) Vlad
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:

×69
×16

question asked: 27 Oct '20, 05:10

question was seen: 698 times

last updated: 30 Oct '20, 08:10