Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

eConnect: Arithmetic overflow error converting expression to data type int.

(0) ShareShare
ReportReport
Posted on by

We are receiving the above error when attempting to insert a sales order into GP2015 via eConnect.  Our original document included all of the necessary components (customer, addresses, lines, payment, header, etc.) and has worked for many other clients in the past.  Here I have broken it down and submitted the customer and addresses separately successfully, just to confirm that eConnect was working at all.  I continued to break down the order document until I was left with nothing but the absolutely required fields in the header, and yet still we receive the error.  If I log into GP and manually create a sales order entry, using only the same required fields, it completes and saves successfully.  Below is the eConnect xml document that I am trying to post, and the stack trace returned.  Any suggestions to move past this would be greatly appreciated.

<eConnect xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">
<SOPTransactionType>
<taSopHdrIvcInsert>
<SOPTYPE>2</SOPTYPE>
<DOCID>ORDERS</DOCID>
<SOPNUMBE>1008</SOPNUMBE>
<DOCDATE>01-13-2016</DOCDATE>
<CUSTNMBR>TESTERYH0001</CUSTNMBR>
<BACHNUMB>WEB</BACHNUMB>
</taSopHdrIvcInsert>
</SOPTransactionType>
</eConnect>

Microsoft.Dynamics.GP.eConnect.eConnectException: Arithmetic overflow error converting expression to data type int.
The statement has been terminated.
at Microsoft.Dynamics.GP.eConnect.ServiceProxy.HandleSqlException(FaultException`1 ex)
at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateEntity(String connectionString, String xml)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateEntity(String connectionString, String sXML)
at DirectDocSenderDotNet.FrmDocSender.btnSend_Click(Object sender, EventArgs e) in c:\Users\ekersey\Desktop\eConnect 14.0\eConnect Samples\CSHARP DirectDocSender\frmDocSender.cs:line 384

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans