PerformWork not firing

Posts   
 
    
Koolworld
User
Posts: 50
Joined: 10-Oct-2006
# Posted on: 11-Apr-2007 19:41:16   

Hi, i've got a problem with a FormView not firing the PerformWork for one of my LLBLGenProDataSource. The datasource code is:

<llblgenpro:LLBLGenProDataSource ID="LLBLGenProDataSourceModCompany" runat="server"
        CacheLocation="Session" DataContainerType="EntityCollection" EntityCollectionTypeName="oeg_intranet.CollectionClasses.CompaniesModeratedCollection, oeg_intranet" LivePersistence="False">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="CompanyFkid" QueryStringField="id" Size="10" Type="Int32"/>
        </SelectParameters>
    </llblgenpro:LLBLGenProDataSource>

it fires the PerformSelect ok. On clicking the Update button (which has the CommandName set to "Update"), it doesn't fire the PerformWork.

I set the FormView1.DataSourceID in the code within the Page_Load as i use 2 different LLBLGenProDataSource depending on how the user came to the page. One works fine, the one above doesn't. Are there any reasons for the PerformWork doesn't fire?

Thanks, Dan.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 11-Apr-2007 20:41:49   

If you hardcode the datasourceid, just for testing, in the HTML, does it then work? Also do you set it ALWAYS? Or just when the page isn't a postback?

Frans Bouma | Lead developer LLBLGen Pro
Koolworld
User
Posts: 50
Joined: 10-Oct-2006
# Posted on: 12-Apr-2007 13:09:53   

Hi, thanks for your response - it turned out to be a typo (forgot it was case sensitive) in the formview DataKeyNames entries! flushed

jovball
User
Posts: 443
Joined: 23-Jan-2005
# Posted on: 11-Nov-2008 05:06:01   

I got tripped up by this same problem and it 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 insert but not on the update.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 11-Nov-2008 07:04:15   

If the event is fired and the save is performed, then the update problem should be another thing. Not really the same issue treated in this thread. Please post more info (http://llblgen.com/TinyForum/Messages.aspx?ThreadID=7720). Better if you open a new thread as this is an old one.

David Elizondo | LLBLGen Support Team