PerformWork event not firing (or: Debugging DataSource controls)

Posts   
 
    
jovball
User
Posts: 443
Joined: 23-Jan-2005
# Posted on: 11-Nov-2008 19:55:57   

I was working with a DataSource control and the PerformWork event was not firing on the update but was firing on the insert. It appeared to be the same problem as this thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9606&HighLight=1

The solution for me was turned out to be that I had a field name with incorrect case (ReportNameID should have been ReportNameId) in the FormView DataKeyNames

This raises a question for me. How can we debug the DataSource controls? I assume that the incorrect field name caused some kind of error behind the scenes and that the error was handled (eaten?). How could I have found that problem more quickly?

In this case, I had a diagnostics trace running on the PerformWork method and I could see that the event was firing (and the save was working) on the FormView insert. However the event was not firing on the FormView update. Even with that, it took some time before I noticed the field name.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 11-Nov-2008 21:42:24   

The LLBLGenProDataSource(2) controls are included in the SD.LLBLGen.Pro.ORMSupportClasses dll. The source code for this is included in the runtime libraries source code package, available from the downloads page at http://www.llblgen.com/pages/secure/ListDownloads.aspx?ProductVersion=6

Matt