Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
pk_davidson

Registered:
Posts: 223
Reply with quote  #1 
After 5 years of an ISD system working fine, recently a strange issue has arrisen.
We gave a new user access to adding records.  Prior to this, we controlled all adds.  End users only editted records.  This end user said that when he added one record, he had to click the Save button "3 times" before the add would "stick."  Apparently, he recieved no error messages or any feedback from the page.   He then added another new record and again had to click the Save button "3 times" before the add would "stick" and again no feedback to the user indicating a problem. 

We've added thousands of records prior to this without ever having to click a save button multiple times.

This table is using Auto-Incremented Identity keys and the very odd thing is that there was a gap between IDs of 8 records.  e.g.  His first new record was assigned ID 5022 and the second record was assigned ID 5031.   According to the end user, no error messages or notifications from the web page.
And this is not a race condition or anything like that.  He was the only one in the database/website at that time.  Looking at the data itself, there are no records with IDs 5023-5030...

We don't care that the numbers aren't sequential.  But I do care that it appears that 8 or 9 data transactions were rolled back, causing the IDENT key to auto-increment, and no notification or error message was given to the end user.  Our data saving code is stock ISD.

I realize this is very generic info and that the help you can give me here is limited.
What I'm wondering is if anyone else has ever seen any behavior like this?

Specifically, apparent data roll backs without any notification to the end user?
Gaps in your ID key values without explanation?

Any suggestions as to how to try to log these errors?  Is there a flag in SQL I can set in order to get a log from the server showing when transactions are rolled back and the cause of the rollback?

Thanks.

__________________
Paul
miles

Avatar / Picture

MVP Consultant
Registered:
Posts: 1,655
Reply with quote  #2 
are  you using stored procedures or inline code?  Have you synched the database to the application recently?  Any custom routines with their own transactions? you should be able to step through the code in VS to try to follow the logic of the save process.

HTH,

__________________
Miles Gibson, MScIS
Iron Speed MVP
Senior Consultant, Principal
Milestone Software Inc.

http://www.ironspeedmvp.com\localizer 
Email: miles@milestone.ca
Milestone Localizer: Full Localization for your Iron Speed applications!
pk_davidson

Registered:
Posts: 223
Reply with quote  #3 
Thanks Miles,
All SPs, all stock save code.
I've been trying the step via VS and so far it all looks fine.

That's the big rub, we cannot duplicate the error but we know it happened by the missing PK values

This page did get a lot more complicated about a year ago with the addition of 3 more Many to Many tables. 
The table was also using triggers to create audit tables.

I've turned off the triggers for now and sprinkled some queued alerts here and there in some catch blocks in an attempt to catch any info.

__________________
Paul
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,927
Reply with quote  #4 
Paul,

To capture all type of errors, we follow the AdventureWorks trigger/sp example.

Check on Sales.Orde/triggers:Istore, particular line - EXECUTE [dbo].[uspLogError];



Cheers,
Jimi J

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

pk_davidson

Registered:
Posts: 223
Reply with quote  #5 
Tx Jimi,
I'll take a look at that!

__________________
Paul
pk_davidson

Registered:
Posts: 223
Reply with quote  #6 
Jimi:

Which demo application is that found in ?  The current demos use Southwind.  If you could give me an ISD version and hopefully it's the OMS demo then I should be able to pull it down and look over the trigger code.

Ah, I found it, directly in the AdventureWorks database.  I
Sales.SalesOrderDetail:triggers:iduSalesOrderDetail, they use a upsLogError in the Catch section.
upsLogError is found in stored procs.

So then my question is, if you're using stock ISD Stored Procs and you add a trigger to the questionable table, how do you check your stock Add/Edit SPs to know if they failed so you can trigger the error handling.  I can see how you could modify the stock SPs but then they will get overwritten won't they?
Would have to override code to call a custom SP, correct?

__________________
Paul
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,927
Reply with quote  #7 
Hi Paul,

I'm talking about AdventureWorks Database Sample that comes with MS SQL Server 2008 R2.


Cheers,
Jimi J

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Download Iron Speed Designer

Terms of Service Privacy Statement