Intermittent Azure SQl Order Save issue

Discussions relating to plugin development, and the Jiwa API.

Intermittent Azure SQl Order Save issue

Postby SBarnes » Tue Oct 01, 2019 12:56 pm

We are getting an issue not all the time related to saving orders under Azure SQL, we have added code to try resaving the order a second time which overcomes the issue most of the time but it does occur on occasion, bar attempting the save multiple times is there any other way to overcome this issue?

Code: Select all
Line 869:  Error Stack Trace   at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine.DoLineCalculations(String ChangeSource)
   Line 869:  Error Stack Trace   at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine.DoLineCalculations(String ChangeSource)
   Line 870:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.CompensateTaxRound()
   Line 870:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.CompensateTaxRound()
   Line 871:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave(Boolean SavingForPrint, Boolean SavingForSplit)
   Line 871:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave(Boolean SavingForPrint, Boolean SavingForSplit)
   Line 872:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave()
   Line 872:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave()
   Line 874:    at WOrderQueue.OrderConsolidator.CancelBackorder(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidator.cs:line 70
   Line 874:    at WOrderQueue.OrderConsolidator.CancelBackorder(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidator.cs:line 70
   Line 875:    at WOrderQueue.OrderConsolidators.CancelBackorders(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidators.cs:line 57
   Line 875:    at WOrderQueue.OrderConsolidators.CancelBackorders(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidators.cs:line 57
Regards
Stuart Barnes
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 611
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 62

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Wed Oct 09, 2019 6:38 am

Hi

With this problem I've noticed a couple of methods on the database object namely

Code: Select all
                            SalesOrder.Manager.Database.BreakConnections();
                            SalesOrder.Manager.Database.GetNewConnection(SalesOrder.Manager.Database.ConnectionString);


Will this force Jiwa to reconnect itself to the database so as to be able to retry the save operation?

I also noticed the IsConnected property and EnsureConnectionValid.
Regards
Stuart Barnes
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 611
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 62

Re: Intermittent Azure SQl Order Save issue

Postby Scott.Pearce » Fri Oct 11, 2019 1:42 pm

What is the error message you are getting when the save fails?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Jiwa Senpai
Jiwa Senpai
 
Posts: 490
Joined: Tue Feb 12, 2008 10:27 am
Location: North Sydney, New South Wales
Topics Solved: 158

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Fri Oct 11, 2019 2:01 pm

Error Exception Object reference not set to an instance of an object. see https://service.jiwa.com.au/browse/DEV-7834 as I now believe there is a bug if call save on an order with status of processed if you change anything on a line.
Regards
Stuart Barnes
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 611
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 62


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 1 guest