Page 1 of 1

Intermittent Azure SQl Order Save issue

PostPosted: Tue Oct 01, 2019 1:56 pm
by SBarnes
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

Re: Intermittent Azure SQl Order Save issue

PostPosted: Wed Oct 09, 2019 7:38 am
by SBarnes
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.

Re: Intermittent Azure SQl Order Save issue

PostPosted: Fri Oct 11, 2019 2:42 pm
by Scott.Pearce
What is the error message you are getting when the save fails?

Re: Intermittent Azure SQl Order Save issue

PostPosted: Fri Oct 11, 2019 3:01 pm
by SBarnes
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.

Re: Intermittent Azure SQl Order Save issue  Topic is solved

PostPosted: Fri Nov 01, 2019 6:27 pm
by Mike.Sheen
SBarnes wrote: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.


I tried to reproduce this issue and could not - DEV-7834 has been updated with how I tried.

We've asked on the service desk issue you logged JIWA-5181 for some steps to repro - if you want this fixed in the next service release you'll need to be quick to make that window as we're not far from releasing that!

Re: Intermittent Azure SQl Order Save issue

PostPosted: Sat Nov 02, 2019 3:29 pm
by SBarnes
Hi Mike,

I've actually been able to work around the issue for the time being.