cancel
Showing results for 
Search instead for 
Did you mean: 

Odata inbound - datetime2 is incompatible with bigint

pavan-yvs-1
Explorer
0 Kudos
532

Hi experts,

Implementing a OData inbound Restful call.

Getting the below error when sending date object in the request. (when I remove date object in the request, it is fine; the request has 5 other atributes.)

Error in postman: Operand type clash: datetime2 is incompatible with bigint; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Operand type clash: datetime2 is incompatible with bigint


It is "java.util.Date" type items.xml.

Below is the impex for IntegrationObjectItemAttribute:
INSERT_UPDATE IntegrationObjectItemAttribute; integrationObjectItem(integrationObject(code), code)[unique = true] ; attributeName[unique = true] ; attributeDescriptor(enclosingType(code), qualifier) ; returnIntegrationObjectItem(integrationObject(code), code) ; unique[default = false] ; autoCreate[default = false]

; InboundSapExternalDocument:SapExternalDocument ; createdAt ; SapExternalDocument:createdAt ; ; ;

Can you please help me. Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

safin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pavan,

The reason maybe that the related type for 'createAt' is int/integer rather than java.util.Date, i just tried it locally, as the type is java.util.Date, the post operation can be successful.

Hopefully it can help you a little.

pavan-yvs-1
Explorer
0 Kudos

Hi safin,

I rechecked and am sure that the type is java.util.Date.
I am using linux virtual box, do you think there is anything to do with that? Please find below the whole error:

uncategorized SQLException for SQL []; SQL state [S0002]; error code [206]; Operand type clash: datetime2 is incompatible with bigint; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Operand type clash: datetime2 is incompatible with bigint