StrataFrame Forum

Strange Save Issue between development Web server and IIS

http://forum.strataframe.net/Topic11814.aspx

By PeterA - 10/3/2007

I've been fighting all kinds of issues trying to get some business objects working the last few weeks. I moved into a simpler section of my application and I'm having a running into a spot of trouble. I thought I got them all worked out. As of this morning, I have this one lingering oddity and I think I've probably been staring at the code too long and I'm missing something really simple.



Here's the basic flow:



1) User clicks an item in a standard MS GridView and is taken to a detail page.

2) Business Objects are used to display the data.

3) User clicks an edit link and is taken to a separate edit page and the business objects are all populated, Business object's Edit() method is called.

4) User edits information, including checking a box that will add new information to an unbound business object

5) User clicks save



This is where my problem is. The save works fine when I'm previewing through the ASP Web development test server. It does all my business rule validation, sets the broken rules and displays a neat little error page if the user screwed up some data. If, however, the user has entered everything correctly, I get a DB2 exception... But only when viewing it on the IIS test server.



The DB2 Exception (coming back in a DataLayerSaveException) really isn't all that helpful:



ERROR [57014] [IBM][DB2/6000] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014



In this case, I know that the query just timed out. It usually means there's some kind of contention and some transaction didn't finish. I'd normally be tearing apart my logic, but it all worked fine on the ASP.NET Development Web server connecting to a DB2 database.



Has anyone else ever seen this? Any suggestions on what I might look at to solve the problem? Any quirks with IIS that you've run into?



Thanks!
By StrataFrame Team - 10/3/2007

What is the full stack trace for the error?  I'm just wondering if it's rooted in UpdateRow()...
By PeterA - 10/3/2007

I got it tracked down. It had to do with the parent-child relationship I'd set up during page load.



I needed to set the ParentObjectName property on my child business object to null. It was trying to run a second save on the child object after I'd added the parent record even though I didn't need it to (I'm programmatically adding the new child record). I'm still confused as to why it would work fine on the ASP.NET development server that Visual Studio uses, but not on IIS.



I think this same thing will solve some of the issues I'm having with my M2M relationships (the thread in the Business Objects form). I just haven't had a chance to try out my theory.



Thanks!