CodeSmith Community
Your Code. Your Way. Faster!

ManyToManyListRelationship Won't Update

Latest post 02-23-2008 5:13 PM by mike123. 3 replies.
  • 02-23-2008 5:50 AM

    ManyToManyListRelationship Won't Update

    Hi

    Im using the follow code below to update a linkmember table;  however the update does not populate any record into the database.

    Any ideas please?

     

     

    <data:MultiFormView ID="FormView1" DataKeyNames="Pk" runat="server" DataSourceID="_YBC_ShowsDataSource" OnDataBound="FormView1_OnDataBound">

     

    <EditItemTemplate>

     

    <table border="0" cellpadding="3" cellspacing="1" width="100%">

    <tr>

    <td class="literal" valign="top">Show Experts</td>

    <td>

    <asp:CheckBoxList ID="SyndicatorsList" runat="server"

    DataSourceID="SyndicatorsDataSource"

    DataTextField="SyndicatorId"

    DataValueField="pk"

    RepeatColumns="2" TextAlign="Right" >

    </asp:CheckBoxList>

     

    <data:ManyToManyListRelationship ID="Syndicator_Show_Relationship" runat="server">

    <PrimaryMember runat="server"

    ID="PrimaryMember1"

    DataSourceID="_YBC_ShowsDataSource"

    EntityKeyName="pk" />

    <LinkMember runat="server"

    ID="LinkMember1"

    DataSourceID="Show_ExpertsDataSource"

    EntityKeyName="Show_Fk"

    ForeignKeyName="Syndicator_Fk" />

    <ReferenceMember runat="server"

    ID="ReferenceMember1"

    DataSourceID="SyndicatorsDataSource"

    ListControlID="SyndicatorsList"

    EntityKeyName="pk" />

    </data:ManyToManyListRelationship>

    <data:_YBC_Show_ExpertsDataSource ID="Show_ExpertsDataSource" runat="server"

    SelectMethod="GetByShow_Fk"

    >

    <Parameters>

    <asp:QueryStringParameter Name="Show_Fk" QueryStringField="Pk" Type="Int32" />

    </Parameters>

    </data:_YBC_Show_ExpertsDataSource>

     

    <data:_YBC_SyndicatorsDataSource ID="SyndicatorsDataSource" runat="server"

    SelectMethod="GetAll"

    >

    </data:_YBC_SyndicatorsDataSource>

    </td>

    </tr>

     

     

    </table>

     

    </EditItemTemplate>

     

    <EmptyDataTemplate>

    <b>Show not found!</b>

    </EmptyDataTemplate>

     

    <FooterTemplate>

    <asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />

    <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />

    <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />

    </FooterTemplate>

    </data:MultiFormView>

     

    <data:_YBC_ShowsDataSource ID="_YBC_ShowsDataSource" runat="server" EnableTransaction="false"

    SelectMethod="GetByPk" >

    <Parameters>

    <asp:QueryStringParameter Name="pk" QueryStringField="Pk" Type="String" />

    </Parameters>

    </data:_YBC_ShowsDataSource>

     

    <br />

     

    • Post Points: 35
  • 02-23-2008 4:37 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 726
    • Points 16,910

    Re: ManyToManyListRelationship Won't Update

    Mike Shatny
    --------------------------------------------------------------
    Member of the .netTiers team http://www.nettiers.com
    --------------------------------------------------------------

    • Post Points: 35
  • 02-23-2008 4:47 PM In reply to

    Re: ManyToManyListRelationship Won't Update

    Thanks Mike; however I did find this post and try to find that line but could not; I'm just running released 2.2 net tiers template. I don't know what revision that is? But i was thinking that, that fix was for a newer template revision.

     

    • Post Points: 35
  • 02-23-2008 5:13 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 726
    • Points 16,910

    Re: ManyToManyListRelationship Won't Update

    Matt,

    As it appears this has got broken in rev 692 (BaseDataSource.cs class) the fix or rollback hasn't made to the latest revision yet http://nettiers.svn.sourceforge.net/viewvc/nettiers/source/trunk/Source/WebLibrary/Data/BaseDataSource.cst?view=log 

    Mike Shatny
    --------------------------------------------------------------
    Member of the .netTiers team http://www.nettiers.com
    --------------------------------------------------------------

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems