Inserting from DetailsView and associated Child Records

Discussion in 'ASP .Net Web Controls' started by Tyler Lynch, Dec 7, 2007.

  1. Tyler Lynch

    Tyler Lynch Guest

    CASE NUMBER: SRX071207601166


    To preface, all data access is done through ObjectDatasounces that are bound
    to StronglyTyped Datasets (VS.NET generated). All UI controls are bound to
    those ObjectDataSources through standard UI binding techniques (point/click).

    I have a DetailsView used for inserting records (Companies). Inside that
    DetailsView I have added a new column template, this template is going to be
    used to add Officers of the company.

    Behind the scenes there is a Companies table and a Officers table. The
    relationships are N number of Officers to a single company.

    My problem is that if I add a DataView in the template to show a list of
    Officers, and a DetailsView to that template to allow inserting of new
    Officers how do I allow users to insert new Officers of the Company, before
    the Company record is actually inserted into the database? I need the
    Officers associated with this company, and the user workflow would be
    burdened if users had to first create a company, and then move to another
    screen to enter Officers and other attributes.





    ==================CODE==================

    <asp:DetailsView CssClass="CompanyInsertContainer" ID="CompanyDetailsView"
    runat="server" AutoGenerateRows="False" DataSourceID="CompanyInfoDS"
    DefaultMode="Insert" HeaderText="Add Company" Height="50px"
    Width="500px" DataKeyNames="CompanyID" GridLines="Vertical"
    HorizontalAlign="Left" OnItemCommand="CompanyDetailsView_ItemCommand"
    OnItemInserted="CompanyDetailsView_ItemInserted" Visible="False">
    <Fields>
    <asp:BoundField DataField="ID" HeaderText="ID"
    InsertVisible="False" ReadOnly="True"
    SortExpression="ID" />
    <asp:TemplateField HeaderText="Officers">
    <InsertItemTemplate>
    <asp:GridView ID="OfficersGridView" runat="server"
    AutoGenerateColumns="False" DataKeyNames="OfficerID"
    DataSourceID="OfficerDS" EmptyDataText="No
    Officers Defined" GridLines="None" ShowFooter="True">
    <Columns>
    <asp:CommandField ShowDeleteButton="True"
    ShowEditButton="True" />
    <asp:BoundField DataField="OfficerID"
    HeaderText="OfficerID" InsertVisible="False"
    ReadOnly="True"
    SortExpression="OfficerID" Visible="False" />
    <asp:BoundField DataField="CompanyID"
    HeaderText="CompanyID" SortExpression="CompanyID"
    Visible="False" />
    <asp:BoundField DataField="Name"
    HeaderText="Name" SortExpression="Name" />
    <asp:BoundField DataField="OfficerTitle"
    HeaderText="OfficerTitle" SortExpression="OfficerTitle" />
    <asp:BoundField DataField="MailingAddr1"
    HeaderText="MailingAddr1" SortExpression="MailingAddr1" />
    <asp:BoundField DataField="MailingAddr2"
    HeaderText="MailingAddr2" SortExpression="MailingAddr2" />
    <asp:BoundField DataField="MailingAddr3"
    HeaderText="MailingAddr3" SortExpression="MailingAddr3" />
    <asp:BoundField DataField="City"
    HeaderText="City" SortExpression="City" />
    <asp:TemplateField HeaderText="StateID"
    SortExpression="StateID">
    <EditItemTemplate>
    <asp:TextBox ID="TextBox1"
    runat="server" Text='<%# Bind("StateID") %>'></asp:TextBox>
    </EditItemTemplate>
    <ItemTemplate>
    <asp:Label ID="Label1"
    runat="server" Text='<%# Bind("StateID") %>'></asp:Label>
    </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="PostalCode"
    HeaderText="PostalCode" SortExpression="PostalCode" />
    <asp:TemplateField HeaderText="CountryID"
    SortExpression="CountryID">
    <EditItemTemplate>
    <asp:TextBox ID="TextBox2"
    runat="server" Text='<%# Bind("CountryID") %>'></asp:TextBox>
    </EditItemTemplate>
    <ItemTemplate>
    <asp:Label ID="Label2"
    runat="server" Text='<%# Bind("CountryID") %>'></asp:Label>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    <HeaderStyle BackColor="#5D7B9D"
    ForeColor="White" />
    </asp:GridView>
    <asp:ObjectDataSource ID="OfficerDS" runat="server"
    DeleteMethod="Delete" InsertMethod="Insert"
    OldValuesParameterFormatString="original_{0}"
    SelectMethod="GetDataByOfficer"
    TypeName="DataObjects.CompanyDataSetTableAdapters.OfficerTableAdapter"
    UpdateMethod="Update">
    <DeleteParameters>
    <asp:parameter Name="Original_OfficerID"
    Type="Int32" />
    <asp:parameter Name="Original_CompanyID"
    Type="Int32" />
    <asp:parameter Name="Original_Name"
    Type="String" />
    <asp:parameter Name="Original_OfficerTitle"
    Type="String" />
    <asp:parameter Name="Original_MailingAddr1"
    Type="String" />
    <asp:parameter Name="Original_MailingAddr2"
    Type="String" />
    <asp:parameter Name="Original_MailingAddr3"
    Type="String" />
    <asp:parameter Name="Original_City"
    Type="String" />
    <asp:parameter Name="Original_StateID"
    Type="Int32" />
    <asp:parameter Name="Original_PostalCode"
    Type="String" />
    <asp:parameter Name="Original_CountryID"
    Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
    <asp:parameter Name="CompanyID" Type="Int32"
    />
    <asp:parameter Name="Name" Type="String" />
    <asp:parameter Name="OfficerTitle"
    Type="String" />
    <asp:parameter Name="MailingAddr1"
    Type="String" />
    <asp:parameter Name="MailingAddr2"
    Type="String" />
    <asp:parameter Name="MailingAddr3"
    Type="String" />
    <asp:parameter Name="City" Type="String" />
    <asp:parameter Name="StateID" Type="Int32" />
    <asp:parameter Name="PostalCode"
    Type="String" />
    <asp:parameter Name="CountryID" Type="Int32"
    />
    <asp:parameter Name="Original_OfficerID"
    Type="Int32" />
    <asp:parameter Name="Original_CompanyID"
    Type="Int32" />
    <asp:parameter Name="Original_Name"
    Type="String" />
    <asp:parameter Name="Original_OfficerTitle"
    Type="String" />
    <asp:parameter Name="Original_MailingAddr1"
    Type="String" />
    <asp:parameter Name="Original_MailingAddr2"
    Type="String" />
    <asp:parameter Name="Original_MailingAddr3"
    Type="String" />
    <asp:parameter Name="Original_City"
    Type="String" />
    <asp:parameter Name="Original_StateID"
    Type="Int32" />
    <asp:parameter Name="Original_PostalCode"
    Type="String" />
    <asp:parameter Name="Original_CountryID"
    Type="Int32" />
    <asp:parameter Name="OfficerID" Type="Int32"
    />
    </UpdateParameters>
    <InsertParameters>
    <asp:parameter Name="CompanyID" Type="Int32"
    />
    <asp:parameter Name="Name" Type="String" />
    <asp:parameter Name="OfficerTitle"
    Type="String" />
    <asp:parameter Name="MailingAddr1"
    Type="String" />
    <asp:parameter Name="MailingAddr2"
    Type="String" />
    <asp:parameter Name="MailingAddr3"
    Type="String" />
    <asp:parameter Name="City" Type="String" />
    <asp:parameter Name="StateID" Type="Int32" />
    <asp:parameter Name="PostalCode"
    Type="String" />
    <asp:parameter Name="CountryID" Type="Int32"
    />
    </InsertParameters>
    <SelectParameters>
    <asp:ControlParameter
    ControlID="OfficersGridView" Name="OfficerID" PropertyName="SelectedValue"
    Type="Int32" />
    </SelectParameters>
    </asp:ObjectDataSource>
    <asp:DetailsView ID="OfficersDetailsView"
    runat="server" AutoGenerateRows="False"
    DataKeyNames="OfficerID"
    DataSourceID="OfficerDS" DefaultMode="Insert" Height="50px"
    Width="125px">
    <Fields>
    <asp:BoundField DataField="OfficerID"
    HeaderText="OfficerID" InsertVisible="False"
    ReadOnly="True"
    SortExpression="OfficerID" />
    <asp:BoundField DataField="CompanyID"
    HeaderText="CompanyID" SortExpression="CompanyID" />
    <asp:BoundField DataField="Name"
    HeaderText="Name" SortExpression="Name" />
    <asp:BoundField DataField="OfficerTitle"
    HeaderText="OfficerTitle" SortExpression="OfficerTitle" />
    <asp:BoundField DataField="MailingAddr1"
    HeaderText="MailingAddr1" SortExpression="MailingAddr1" />
    <asp:BoundField DataField="MailingAddr2"
    HeaderText="MailingAddr2" SortExpression="MailingAddr2" />
    <asp:BoundField DataField="MailingAddr3"
    HeaderText="MailingAddr3" SortExpression="MailingAddr3" />
    <asp:BoundField DataField="City"
    HeaderText="City" SortExpression="City" />
    <asp:BoundField DataField="StateID"
    HeaderText="StateID" SortExpression="StateID" />
    <asp:BoundField DataField="PostalCode"
    HeaderText="PostalCode" SortExpression="PostalCode" />
    <asp:BoundField DataField="CountryID"
    HeaderText="CountryID" SortExpression="CountryID" />
    <asp:CommandField ShowEditButton="True"
    ShowInsertButton="True" />
    </Fields>
    </asp:DetailsView>
    <asp:ImageButton ID="ImageButton1" runat="server"
    ImageUrl="~/images/add.png" OnClick="ImageButton1_Click" />
    </InsertItemTemplate>
    </asp:TemplateField>
    <asp:CommandField ShowDeleteButton="True"
    ShowEditButton="True" ShowInsertButton="True" />
    </Fields>
    <RowStyle BackColor="#F7F6F3" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
    ForeColor="White" />
    <AlternatingRowStyle BackColor="White" />
    <CommandRowStyle BorderStyle="None" Font-Bold="True" />
    </asp:DetailsView>



    <asp:ObjectDataSource ID="CompanyInfoDS" runat="server"
    DeleteMethod="Delete" InsertMethod="Insert"
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"

    TypeName="DataObjects.CompanyDataSetTableAdapters.CompanyTableAdapter"
    UpdateMethod="Update">
    <DeleteParameters>
    <asp:parameter Name="Original_CompanyID" Type="Int32" />
    <asp:parameter Name="Original_ClientID" Type="Int32" />
    <asp:parameter Name="Original_FilerID" Type="Int32" />
    <asp:parameter Name="Original_FileNumber" Type="Int32" />
    <asp:parameter Name="Original_TaxType" Type="String" />
    <asp:parameter Name="Original_FederalID" Type="Int32" />
    <asp:parameter Name="Original_PhoneNumber" Type="String" />
    <asp:parameter Name="Original_InactivityFromDate"
    Type="DateTime" />
    <asp:parameter Name="Original_InactivityToDate" Type="DateTime" />
    <asp:parameter Name="Original_RegulatedInvestAssetJan1"
    Type="Int64" />
    <asp:parameter Name="Original_RegulatedInvestAssetDec31"
    Type="Int64" />
    <asp:parameter Name="Original_FranchiseTax" Type="Decimal" />
    <asp:parameter Name="Original_Penalty" Type="Decimal" />
    <asp:parameter Name="Original_Interest" Type="Decimal" />
    <asp:parameter Name="Original_FilingFee" Type="Decimal" />
    <asp:parameter Name="Original_CheckCharge" Type="Decimal" />
    <asp:parameter Name="Original_CrOrPrePaid" Type="Decimal" />
    <asp:parameter Name="Original_AmountDue" Type="Decimal" />
    <asp:parameter Name="Original_AmountPaid" Type="Decimal" />
    <asp:parameter Name="Original_TaxYear" Type="Int16" />
    <asp:parameter Name="Original_NatureBusiness" Type="String" />
    <asp:parameter Name="Original_PrincipalMailingAddr1"
    Type="String" />
    <asp:parameter Name="Original_PrincipalMailingAddr2"
    Type="String" />
    <asp:parameter Name="Original_PrincipalMailingAddr3"
    Type="String" />
    <asp:parameter Name="Original_PrincipalCity" Type="String" />
    <asp:parameter Name="Original_PrincipalStateID" Type="Int32" />
    <asp:parameter Name="Original_PrincipalPostalCode" Type="String"
    />
    <asp:parameter Name="Original_PrincipalCountryID" Type="Int32" />
    <asp:parameter Name="Original_PrincipalPhoneNumber"
    Type="String" />
    <asp:parameter Name="Original_PrincipalPhoneExt" Type="String" />
    <asp:parameter Name="Original_PrincipalEMail" Type="String" />
    <asp:parameter Name="Original_RealEstateInDelaware" Type="Int32"
    />
    <asp:parameter Name="Original_TaxPaidOnRealEstate" Type="Int32" />
    <asp:parameter Name="Original_NumDirectors" Type="Int16" />
    <asp:parameter Name="Original_NoAppointedOfficer" Type="Boolean"
    />
    <asp:parameter Name="Original_NoElectedDirectors" Type="Boolean"
    />
    <asp:parameter Name="Original_DirectorsPDF" Type="String" />
    <asp:parameter Name="Original_Mark" Type="String" />
    <asp:parameter Name="Original_Title" Type="String" />
    <asp:parameter Name="Original_MarkMailingAddr1" Type="String" />
    <asp:parameter Name="Original_MarkMailingAddr2" Type="String" />
    <asp:parameter Name="Original_MarkMailingAddr3" Type="String" />
    <asp:parameter Name="Original_MarkCity" Type="String" />
    <asp:parameter Name="Original_MarkStateID" Type="Int32" />
    <asp:parameter Name="Original_MarkPostalCode" Type="String" />
    <asp:parameter Name="Original_MarkCountryID" Type="Int32" />
    <asp:parameter Name="Original_Date" Type="DateTime" />
    </DeleteParameters>
    <UpdateParameters>
    <asp:parameter Name="ClientID" Type="Int32" />
    <asp:parameter Name="FilerID" Type="Int32" />
    <asp:parameter Name="FileNumber" Type="Int32" />
    <asp:parameter Name="TaxType" Type="String" />
    <asp:parameter Name="FederalID" Type="Int32" />
    <asp:parameter Name="PhoneNumber" Type="String" />
    <asp:parameter Name="InactivityFromDate" Type="DateTime" />
    <asp:parameter Name="InactivityToDate" Type="DateTime" />
    <asp:parameter Name="RegulatedInvestAssetJan1" Type="Int64" />
    <asp:parameter Name="RegulatedInvestAssetDec31" Type="Int64" />
    <asp:parameter Name="FranchiseTax" Type="Decimal" />
    <asp:parameter Name="Penalty" Type="Decimal" />
    <asp:parameter Name="Interest" Type="Decimal" />
    <asp:parameter Name="FilingFee" Type="Decimal" />
    <asp:parameter Name="CheckCharge" Type="Decimal" />
    <asp:parameter Name="CrOrPrePaid" Type="Decimal" />
    <asp:parameter Name="AmountDue" Type="Decimal" />
    <asp:parameter Name="AmountPaid" Type="Decimal" />
    <asp:parameter Name="TaxYear" Type="Int16" />
    <asp:parameter Name="NatureBusiness" Type="String" />
    <asp:parameter Name="PrincipalMailingAddr1" Type="String" />
    <asp:parameter Name="PrincipalMailingAddr2" Type="String" />
    <asp:parameter Name="PrincipalMailingAddr3" Type="String" />
    <asp:parameter Name="PrincipalCity" Type="String" />
    <asp:parameter Name="PrincipalStateID" Type="Int32" />
    <asp:parameter Name="PrincipalPostalCode" Type="String" />
    <asp:parameter Name="PrincipalCountryID" Type="Int32" />
    <asp:parameter Name="PrincipalPhoneNumber" Type="String" />
    <asp:parameter Name="PrincipalPhoneExt" Type="String" />
    <asp:parameter Name="PrincipalEMail" Type="String" />
    <asp:parameter Name="RealEstateInDelaware" Type="Int32" />
    <asp:parameter Name="TaxPaidOnRealEstate" Type="Int32" />
    <asp:parameter Name="NumDirectors" Type="Int16" />
    <asp:parameter Name="NoAppointedOfficer" Type="Boolean" />
    <asp:parameter Name="NoElectedDirectors" Type="Boolean" />
    <asp:parameter Name="DirectorsPDF" Type="String" />
    <asp:parameter Name="Mark" Type="String" />
    <asp:parameter Name="Title" Type="String" />
    <asp:parameter Name="MarkMailingAddr1" Type="String" />
    <asp:parameter Name="MarkMailingAddr2" Type="String" />
    <asp:parameter Name="MarkMailingAddr3" Type="String" />
    <asp:parameter Name="MarkCity" Type="String" />
    <asp:parameter Name="MarkStateID" Type="Int32" />
    <asp:parameter Name="MarkPostalCode" Type="String" />
    <asp:parameter Name="MarkCountryID" Type="Int32" />
    <asp:parameter Name="Date" Type="DateTime" />
    <asp:parameter Name="Original_CompanyID" Type="Int32" />
    <asp:parameter Name="Original_ClientID" Type="Int32" />
    <asp:parameter Name="Original_FilerID" Type="Int32" />
    <asp:parameter Name="Original_FileNumber" Type="Int32" />
    <asp:parameter Name="Original_TaxType" Type="String" />
    <asp:parameter Name="Original_FederalID" Type="Int32" />
    <asp:parameter Name="Original_PhoneNumber" Type="String" />
    <asp:parameter Name="Original_InactivityFromDate"
    Type="DateTime" />
    <asp:parameter Name="Original_InactivityToDate" Type="DateTime" />
    <asp:parameter Name="Original_RegulatedInvestAssetJan1"
    Type="Int64" />
    <asp:parameter Name="Original_RegulatedInvestAssetDec31"
    Type="Int64" />
    <asp:parameter Name="Original_FranchiseTax" Type="Decimal" />
    <asp:parameter Name="Original_Penalty" Type="Decimal" />
    <asp:parameter Name="Original_Interest" Type="Decimal" />
    <asp:parameter Name="Original_FilingFee" Type="Decimal" />
    <asp:parameter Name="Original_CheckCharge" Type="Decimal" />
    <asp:parameter Name="Original_CrOrPrePaid" Type="Decimal" />
    <asp:parameter Name="Original_AmountDue" Type="Decimal" />
    <asp:parameter Name="Original_AmountPaid" Type="Decimal" />
    <asp:parameter Name="Original_TaxYear" Type="Int16" />
    <asp:parameter Name="Original_NatureBusiness" Type="String" />
    <asp:parameter Name="Original_PrincipalMailingAddr1"
    Type="String" />
    <asp:parameter Name="Original_PrincipalMailingAddr2"
    Type="String" />
    <asp:parameter Name="Original_PrincipalMailingAddr3"
    Type="String" />
    <asp:parameter Name="Original_PrincipalCity" Type="String" />
    <asp:parameter Name="Original_PrincipalStateID" Type="Int32" />
    <asp:parameter Name="Original_PrincipalPostalCode" Type="String"
    />
    <asp:parameter Name="Original_PrincipalCountryID" Type="Int32" />
    <asp:parameter Name="Original_PrincipalPhoneNumber"
    Type="String" />
    <asp:parameter Name="Original_PrincipalPhoneExt" Type="String" />
    <asp:parameter Name="Original_PrincipalEMail" Type="String" />
    <asp:parameter Name="Original_RealEstateInDelaware" Type="Int32"
    />
    <asp:parameter Name="Original_TaxPaidOnRealEstate" Type="Int32" />
    <asp:parameter Name="Original_NumDirectors" Type="Int16" />
    <asp:parameter Name="Original_NoAppointedOfficer" Type="Boolean"
    />
    <asp:parameter Name="Original_NoElectedDirectors" Type="Boolean"
    />
    <asp:parameter Name="Original_DirectorsPDF" Type="String" />
    <asp:parameter Name="Original_Mark" Type="String" />
    <asp:parameter Name="Original_Title" Type="String" />
    <asp:parameter Name="Original_MarkMailingAddr1" Type="String" />
    <asp:parameter Name="Original_MarkMailingAddr2" Type="String" />
    <asp:parameter Name="Original_MarkMailingAddr3" Type="String" />
    <asp:parameter Name="Original_MarkCity" Type="String" />
    <asp:parameter Name="Original_MarkStateID" Type="Int32" />
    <asp:parameter Name="Original_MarkPostalCode" Type="String" />
    <asp:parameter Name="Original_MarkCountryID" Type="Int32" />
    <asp:parameter Name="Original_Date" Type="DateTime" />
    <asp:parameter Name="CompanyID" Type="Int32" />
    </UpdateParameters>
    <InsertParameters>
    <asp:parameter Name="ClientID" Type="Int32" />
    <asp:parameter Name="FilerID" Type="Int32" />
    <asp:parameter Name="FileNumber" Type="Int32" />
    <asp:parameter Name="TaxType" Type="String" />
    <asp:parameter Name="FederalID" Type="Int32" />
    <asp:parameter Name="PhoneNumber" Type="String" />
    <asp:parameter Name="InactivityFromDate" Type="DateTime" />
    <asp:parameter Name="InactivityToDate" Type="DateTime" />
    <asp:parameter Name="RegulatedInvestAssetJan1" Type="Int64" />
    <asp:parameter Name="RegulatedInvestAssetDec31" Type="Int64" />
    <asp:parameter Name="FranchiseTax" Type="Decimal" />
    <asp:parameter Name="Penalty" Type="Decimal" />
    <asp:parameter Name="Interest" Type="Decimal" />
    <asp:parameter Name="FilingFee" Type="Decimal" />
    <asp:parameter Name="CheckCharge" Type="Decimal" />
    <asp:parameter Name="CrOrPrePaid" Type="Decimal" />
    <asp:parameter Name="AmountDue" Type="Decimal" />
    <asp:parameter Name="AmountPaid" Type="Decimal" />
    <asp:parameter Name="TaxYear" Type="Int16" />
    <asp:parameter Name="NatureBusiness" Type="String" />
    <asp:parameter Name="PrincipalMailingAddr1" Type="String" />
    <asp:parameter Name="PrincipalMailingAddr2" Type="String" />
    <asp:parameter Name="PrincipalMailingAddr3" Type="String" />
    <asp:parameter Name="PrincipalCity" Type="String" />
    <asp:parameter Name="PrincipalStateID" Type="Int32" />
    <asp:parameter Name="PrincipalPostalCode" Type="String" />
    <asp:parameter Name="PrincipalCountryID" Type="Int32" />
    <asp:parameter Name="PrincipalPhoneNumber" Type="String" />
    <asp:parameter Name="PrincipalPhoneExt" Type="String" />
    <asp:parameter Name="PrincipalEMail" Type="String" />
    <asp:parameter Name="RealEstateInDelaware" Type="Int32" />
    <asp:parameter Name="TaxPaidOnRealEstate" Type="Int32" />
    <asp:parameter Name="NumDirectors" Type="Int16" />
    <asp:parameter Name="NoAppointedOfficer" Type="Boolean" />
    <asp:parameter Name="NoElectedDirectors" Type="Boolean" />
    <asp:parameter Name="DirectorsPDF" Type="String" />
    <asp:parameter Name="Mark" Type="String" />
    <asp:parameter Name="Title" Type="String" />
    <asp:parameter Name="MarkMailingAddr1" Type="String" />
    <asp:parameter Name="MarkMailingAddr2" Type="String" />
    <asp:parameter Name="MarkMailingAddr3" Type="String" />
    <asp:parameter Name="MarkCity" Type="String" />
    <asp:parameter Name="MarkStateID" Type="Int32" />
    <asp:parameter Name="MarkPostalCode" Type="String" />
    <asp:parameter Name="MarkCountryID" Type="Int32" />
    <asp:parameter Name="Date" Type="DateTime" />
    </InsertParameters>
    </asp:ObjectDataSource>
    Tyler Lynch, Dec 7, 2007
    #1
    1. Advertising

  2. Tyler Lynch

    Phil H Guest

    On 7 Dec, 19:56, Tyler Lynch <Tyler >
    wrote:
    > CASE NUMBER: SRX071207601166
    >
    > To preface, all data access is done through ObjectDatasounces that are bound
    > to StronglyTyped Datasets (VS.NET generated). All UI controls are bound to
    > those ObjectDataSources through standard UI binding techniques (point/click).
    >
    > I have a DetailsView used for inserting records (Companies). Inside that
    > DetailsView I have added a new column template, this template is going to be
    > used to add Officers of the company.
    >
    > Behind the scenes there is a Companies table and a Officers table. The
    > relationships are N number of Officers to a single company.
    >
    > My problem is that if I add a DataView in the template to show a list of
    > Officers, and a DetailsView to that template to allow inserting of new
    > Officers how do I allow users to insert new Officers of the Company, before
    > the Company record is actually inserted into the database? I need the
    > Officers associated with this company, and the user workflow would be
    > burdened if users had to first create a company, and then move to another
    > screen to enter Officers and other attributes.
    >
    > ==================CODE==================
    >
    > <asp:DetailsView CssClass="CompanyInsertContainer" ID="CompanyDetailsView"
    > runat="server" AutoGenerateRows="False" DataSourceID="CompanyInfoDS"
    > DefaultMode="Insert" HeaderText="Add Company" Height="50px"
    > Width="500px" DataKeyNames="CompanyID" GridLines="Vertical"
    > HorizontalAlign="Left" OnItemCommand="CompanyDetailsView_ItemCommand"
    > OnItemInserted="CompanyDetailsView_ItemInserted" Visible="False">
    > <Fields>
    > <asp:BoundField DataField="ID" HeaderText="ID"
    > InsertVisible="False" ReadOnly="True"
    > SortExpression="ID" />
    > <asp:TemplateField HeaderText="Officers">
    > <InsertItemTemplate>
    > <asp:GridView ID="OfficersGridView" runat="server"
    > AutoGenerateColumns="False" DataKeyNames="OfficerID"
    > DataSourceID="OfficerDS" EmptyDataText="No
    > Officers Defined" GridLines="None" ShowFooter="True">
    > <Columns>
    > <asp:CommandField ShowDeleteButton="True"
    > ShowEditButton="True" />
    > <asp:BoundField DataField="OfficerID"
    > HeaderText="OfficerID" InsertVisible="False"
    > ReadOnly="True"
    > SortExpression="OfficerID" Visible="False" />
    > <asp:BoundField DataField="CompanyID"
    > HeaderText="CompanyID" SortExpression="CompanyID"
    > Visible="False" />
    > <asp:BoundField DataField="Name"
    > HeaderText="Name" SortExpression="Name" />
    > <asp:BoundField DataField="OfficerTitle"
    > HeaderText="OfficerTitle" SortExpression="OfficerTitle" />
    > <asp:BoundField DataField="MailingAddr1"
    > HeaderText="MailingAddr1" SortExpression="MailingAddr1" />
    > <asp:BoundField DataField="MailingAddr2"
    > HeaderText="MailingAddr2" SortExpression="MailingAddr2" />
    > <asp:BoundField DataField="MailingAddr3"
    > HeaderText="MailingAddr3" SortExpression="MailingAddr3" />
    > <asp:BoundField DataField="City"
    > HeaderText="City" SortExpression="City" />
    > <asp:TemplateField HeaderText="StateID"
    > SortExpression="StateID">
    > <EditItemTemplate>
    > <asp:TextBox ID="TextBox1"
    > runat="server" Text='<%# Bind("StateID") %>'></asp:TextBox>
    > </EditItemTemplate>
    > <ItemTemplate>
    > <asp:Label ID="Label1"
    > runat="server" Text='<%# Bind("StateID") %>'></asp:Label>
    > </ItemTemplate>
    > </asp:TemplateField>
    > <asp:BoundField DataField="PostalCode"
    > HeaderText="PostalCode" SortExpression="PostalCode" />
    > <asp:TemplateField HeaderText="CountryID"
    > SortExpression="CountryID">
    > <EditItemTemplate>
    > <asp:TextBox ID="TextBox2"
    > runat="server" Text='<%# Bind("CountryID") %>'></asp:TextBox>
    > </EditItemTemplate>
    > <ItemTemplate>
    > <asp:Label ID="Label2"
    > runat="server" Text='<%# Bind("CountryID") %>'></asp:Label>
    > </ItemTemplate>
    > </asp:TemplateField>
    > </Columns>
    > <HeaderStyle BackColor="#5D7B9D"
    > ForeColor="White" />
    > </asp:GridView>
    > <asp:ObjectDataSource ID="OfficerDS" runat="server"
    > DeleteMethod="Delete" InsertMethod="Insert"
    > OldValuesParameterFormatString="original_{0}"
    > SelectMethod="GetDataByOfficer"
    > TypeName="DataObjects.CompanyDataSetTableAdapters.OfficerTableAdapter"
    > UpdateMethod="Update">
    > <DeleteParameters>
    > <asp:parameter Name="Original_OfficerID"
    > Type="Int32" />
    > <asp:parameter Name="Original_CompanyID"
    > Type="Int32" />
    > <asp:parameter Name="Original_Name"
    > Type="String" />
    > <asp:parameter Name="Original_OfficerTitle"
    > Type="String" />
    > <asp:parameter Name="Original_MailingAddr1"
    > Type="String" />
    > <asp:parameter Name="Original_MailingAddr2"
    > Type="String" />
    > <asp:parameter Name="Original_MailingAddr3"
    > Type="String" />
    > <asp:parameter Name="Original_City"
    > Type="String" />
    > <asp:parameter Name="Original_StateID"
    > Type="Int32" />
    > <asp:parameter Name="Original_PostalCode"
    > Type="String" />
    > <asp:parameter Name="Original_CountryID"
    > Type="Int32" />
    > </DeleteParameters>
    > <UpdateParameters>
    > <asp:parameter Name="CompanyID" Type="Int32"
    > />
    > <asp:parameter Name="Name" Type="String" />
    > <asp:parameter Name="OfficerTitle"
    > Type="String" />
    > <asp:parameter Name="MailingAddr1"
    > Type="String" />
    > <asp:parameter Name="MailingAddr2"
    > Type="String" />
    > <asp:parameter Name="MailingAddr3"
    > Type="String" />
    > <asp:parameter Name="City" Type="String" />
    > <asp:parameter Name="StateID" Type="Int32" />
    > <asp:parameter Name="PostalCode"
    > Type="String" />
    > <asp:parameter Name="CountryID" Type="Int32"
    > />
    > <asp:parameter Name="Original_OfficerID"
    > Type="Int32" />
    > <asp:parameter Name="Original_CompanyID"
    > Type="Int32" />
    > <asp:parameter Name="Original_Name"
    > Type="String" />
    > <asp:parameter Name="Original_OfficerTitle"
    > Type="String" />
    > <asp:parameter Name="Original_MailingAddr1"
    > Type="String" />
    > <asp:parameter Name="Original_MailingAddr2"
    > Type="String" />
    > <asp:parameter Name="Original_MailingAddr3"
    > Type="String" />
    > <asp:parameter Name="Original_City"
    > Type="String" />
    > <asp:parameter Name="Original_StateID"
    > Type="Int32" />
    > <asp:parameter Name="Original_PostalCode"
    > Type="String" />
    > <asp:parameter Name="Original_CountryID"
    > Type="Int32" />
    > <asp:parameter Name="OfficerID" Type="Int32"
    > />
    > </UpdateParameters>
    > <InsertParameters>
    > <asp:parameter Name="CompanyID" Type="Int32"
    > />
    > <asp:parameter Name="Name" Type="String" />
    > <asp:parameter Name="OfficerTitle"
    > Type="String" />
    > <asp:parameter Name="MailingAddr1"
    > Type="String" />
    > <asp:parameter Name="MailingAddr2"
    > Type="String" />
    > <asp:parameter Name="MailingAddr3"
    > Type="String" />
    > <asp:parameter Name="City" Type="String" />
    > <asp:parameter Name="StateID" Type="Int32" />
    > <asp:parameter Name="PostalCode"
    > Type="String" />
    > <asp:parameter Name="CountryID" Type="Int32"
    > />
    > </InsertParameters>
    > <SelectParameters>
    > <asp:ControlParameter
    > ControlID="OfficersGridView" Name="OfficerID" PropertyName="SelectedValue"
    > Type="Int32" />
    > </SelectParameters>
    > </asp:ObjectDataSource>
    > <asp:DetailsView ID="OfficersDetailsView"
    > runat="server" AutoGenerateRows="False"
    > DataKeyNames="OfficerID"
    > DataSourceID="OfficerDS" DefaultMode="Insert" Height="50px"
    > Width="125px">
    > <Fields>
    > <asp:BoundField DataField="OfficerID"
    > HeaderText="OfficerID" InsertVisible="False"
    > ReadOnly="True"
    > SortExpression="OfficerID" />
    > <asp:BoundField DataField="CompanyID"
    > HeaderText="CompanyID" SortExpression="CompanyID" />
    > <asp:BoundField DataField="Name"
    > HeaderText="Name" SortExpression="Name" />
    > <asp:BoundField DataField="OfficerTitle"
    > HeaderText="OfficerTitle" SortExpression="OfficerTitle" />
    > <asp:BoundField DataField="MailingAddr1"
    > HeaderText="MailingAddr1" SortExpression="MailingAddr1" />
    > <asp:BoundField DataField="MailingAddr2"
    > HeaderText="MailingAddr2" SortExpression="MailingAddr2" />
    > <asp:BoundField DataField="MailingAddr3"
    > HeaderText="MailingAddr3" SortExpression="MailingAddr3" />
    > <asp:BoundField DataField="City"
    > HeaderText="City" SortExpression="City" />
    > <asp:BoundField DataField="StateID"
    > HeaderText="StateID" SortExpression="StateID" />
    > <asp:BoundField DataField="PostalCode"
    > HeaderText="PostalCode" SortExpression="PostalCode" />
    > <asp:BoundField DataField="CountryID"
    > HeaderText="CountryID" SortExpression="CountryID" />
    > <asp:CommandField ShowEditButton="True"
    > ShowInsertButton="True" />
    > </Fields>
    > </asp:DetailsView>
    > <asp:ImageButton ID="ImageButton1" runat="server"
    > ImageUrl="~/images/add.png" OnClick="ImageButton1_Click" />
    > </InsertItemTemplate>
    > </asp:TemplateField>
    > <asp:CommandField ShowDeleteButton="True"
    > ShowEditButton="True" ShowInsertButton="True" />
    > </Fields>
    > <RowStyle BackColor="#F7F6F3" />
    > <HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
    > ForeColor="White" />
    > <AlternatingRowStyle BackColor="White" />
    > <CommandRowStyle BorderStyle="None" Font-Bold="True" />
    > </asp:DetailsView>
    >
    > <asp:ObjectDataSource ID="CompanyInfoDS" runat="server"
    > DeleteMethod="Delete" InsertMethod="Insert"
    > OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
    >
    > TypeName="DataObjects.CompanyDataSetTableAdapters.CompanyTableAdapter"
    > UpdateMethod="Update">
    > <DeleteParameters>
    > <asp:parameter Name="Original_CompanyID" Type="Int32" />
    > <asp:parameter Name="Original_ClientID" Type="Int32" />
    > <asp:parameter Name="Original_FilerID" Type="Int32" />
    > <asp:parameter Name="Original_FileNumber" Type="Int32" />
    > <asp:parameter Name="Original_TaxType" Type="String" />
    > <asp:parameter Name="Original_FederalID" Type="Int32" />
    > <asp:parameter Name="Original_PhoneNumber" Type="String" />
    > <asp:parameter Name="Original_InactivityFromDate"
    > Type="DateTime" />
    > <asp:parameter Name="Original_InactivityToDate" Type="DateTime" />
    > <asp:parameter Name="Original_RegulatedInvestAssetJan1"
    > Type="Int64" />
    > <asp:parameter Name="Original_RegulatedInvestAssetDec31"
    > Type="Int64" />
    > <asp:parameter Name="Original_FranchiseTax" Type="Decimal" />
    > <asp:parameter Name="Original_Penalty" Type="Decimal" />
    > <asp:parameter Name="Original_Interest" Type="Decimal" />
    > <asp:parameter Name="Original_FilingFee" Type="Decimal" />
    > <asp:parameter Name="Original_CheckCharge" Type="Decimal" />
    > <asp:parameter Name="Original_CrOrPrePaid" Type="Decimal" />
    > <asp:parameter Name="Original_AmountDue" Type="Decimal" />
    > <asp:parameter Name="Original_AmountPaid" Type="Decimal" />
    > <asp:parameter Name="Original_TaxYear" Type="Int16" />
    > <asp:parameter Name="Original_NatureBusiness" Type="String" />
    > <asp:parameter Name="Original_PrincipalMailingAddr1"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalMailingAddr2"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalMailingAddr3"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalCity" Type="String" />
    > <asp:parameter Name="Original_PrincipalStateID" Type="Int32" />
    > <asp:parameter Name="Original_PrincipalPostalCode" Type="String"
    > />
    > <asp:parameter Name="Original_PrincipalCountryID" Type="Int32" />
    > <asp:parameter Name="Original_PrincipalPhoneNumber"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalPhoneExt" Type="String" />
    > <asp:parameter Name="Original_PrincipalEMail" Type="String" />
    > <asp:parameter Name="Original_RealEstateInDelaware" Type="Int32"
    > />
    > <asp:parameter Name="Original_TaxPaidOnRealEstate" Type="Int32" />
    > <asp:parameter Name="Original_NumDirectors" Type="Int16" />
    > <asp:parameter Name="Original_NoAppointedOfficer" Type="Boolean"
    > />
    > <asp:parameter Name="Original_NoElectedDirectors" Type="Boolean"
    > />
    > <asp:parameter Name="Original_DirectorsPDF" Type="String" />
    > <asp:parameter Name="Original_Mark" Type="String" />
    > <asp:parameter Name="Original_Title" Type="String" />
    > <asp:parameter Name="Original_MarkMailingAddr1" Type="String" />
    > <asp:parameter Name="Original_MarkMailingAddr2" Type="String" />
    > <asp:parameter Name="Original_MarkMailingAddr3" Type="String" />
    > <asp:parameter Name="Original_MarkCity" Type="String" />
    > <asp:parameter Name="Original_MarkStateID" Type="Int32" />
    > <asp:parameter Name="Original_MarkPostalCode" Type="String" />
    > <asp:parameter Name="Original_MarkCountryID" Type="Int32" />
    > <asp:parameter Name="Original_Date" Type="DateTime" />
    > </DeleteParameters>
    > <UpdateParameters>
    > <asp:parameter Name="ClientID" Type="Int32" />
    > <asp:parameter Name="FilerID" Type="Int32" />
    > <asp:parameter Name="FileNumber" Type="Int32" />
    > <asp:parameter Name="TaxType" Type="String" />
    > <asp:parameter Name="FederalID" Type="Int32" />
    > <asp:parameter Name="PhoneNumber" Type="String" />
    > <asp:parameter Name="InactivityFromDate" Type="DateTime" />
    > <asp:parameter Name="InactivityToDate" Type="DateTime" />
    > <asp:parameter Name="RegulatedInvestAssetJan1" Type="Int64" />
    > <asp:parameter Name="RegulatedInvestAssetDec31" Type="Int64" />
    > <asp:parameter Name="FranchiseTax" Type="Decimal" />
    > <asp:parameter Name="Penalty" Type="Decimal" />
    > <asp:parameter Name="Interest" Type="Decimal" />
    > <asp:parameter Name="FilingFee" Type="Decimal" />
    > <asp:parameter Name="CheckCharge" Type="Decimal" />
    > <asp:parameter Name="CrOrPrePaid" Type="Decimal" />
    > <asp:parameter Name="AmountDue" Type="Decimal" />
    > <asp:parameter Name="AmountPaid" Type="Decimal" />
    > <asp:parameter Name="TaxYear" Type="Int16" />
    > <asp:parameter Name="NatureBusiness" Type="String" />
    > <asp:parameter Name="PrincipalMailingAddr1" Type="String" />
    > <asp:parameter Name="PrincipalMailingAddr2" Type="String" />
    > <asp:parameter Name="PrincipalMailingAddr3" Type="String" />
    > <asp:parameter Name="PrincipalCity" Type="String" />
    > <asp:parameter Name="PrincipalStateID" Type="Int32" />
    > <asp:parameter Name="PrincipalPostalCode" Type="String" />
    > <asp:parameter Name="PrincipalCountryID" Type="Int32" />
    > <asp:parameter Name="PrincipalPhoneNumber" Type="String" />
    > <asp:parameter Name="PrincipalPhoneExt" Type="String" />
    > <asp:parameter Name="PrincipalEMail" Type="String" />
    > <asp:parameter Name="RealEstateInDelaware" Type="Int32" />
    > <asp:parameter Name="TaxPaidOnRealEstate" Type="Int32" />
    > <asp:parameter Name="NumDirectors" Type="Int16" />
    > <asp:parameter Name="NoAppointedOfficer" Type="Boolean" />
    > <asp:parameter Name="NoElectedDirectors" Type="Boolean" />
    > <asp:parameter Name="DirectorsPDF" Type="String" />
    > <asp:parameter Name="Mark" Type="String" />
    > <asp:parameter Name="Title" Type="String" />
    > <asp:parameter Name="MarkMailingAddr1" Type="String" />
    > <asp:parameter Name="MarkMailingAddr2" Type="String" />
    > <asp:parameter Name="MarkMailingAddr3" Type="String" />
    > <asp:parameter Name="MarkCity" Type="String" />
    > <asp:parameter Name="MarkStateID" Type="Int32" />
    > <asp:parameter Name="MarkPostalCode" Type="String" />
    > <asp:parameter Name="MarkCountryID" Type="Int32" />
    > <asp:parameter Name="Date" Type="DateTime" />
    > <asp:parameter Name="Original_CompanyID" Type="Int32" />
    > <asp:parameter Name="Original_ClientID" Type="Int32" />
    > <asp:parameter Name="Original_FilerID" Type="Int32" />
    > <asp:parameter Name="Original_FileNumber" Type="Int32" />
    > <asp:parameter Name="Original_TaxType" Type="String" />
    > <asp:parameter Name="Original_FederalID" Type="Int32" />
    > <asp:parameter Name="Original_PhoneNumber" Type="String" />
    > <asp:parameter Name="Original_InactivityFromDate"
    > Type="DateTime" />
    > <asp:parameter Name="Original_InactivityToDate" Type="DateTime" />
    > <asp:parameter Name="Original_RegulatedInvestAssetJan1"
    > Type="Int64" />
    > <asp:parameter Name="Original_RegulatedInvestAssetDec31"
    > Type="Int64" />
    > <asp:parameter Name="Original_FranchiseTax" Type="Decimal" />
    > <asp:parameter Name="Original_Penalty" Type="Decimal" />
    > <asp:parameter Name="Original_Interest" Type="Decimal" />
    > <asp:parameter Name="Original_FilingFee" Type="Decimal" />
    > <asp:parameter Name="Original_CheckCharge" Type="Decimal" />
    > <asp:parameter Name="Original_CrOrPrePaid" Type="Decimal" />
    > <asp:parameter Name="Original_AmountDue" Type="Decimal" />
    > <asp:parameter Name="Original_AmountPaid" Type="Decimal" />
    > <asp:parameter Name="Original_TaxYear" Type="Int16" />
    > <asp:parameter Name="Original_NatureBusiness" Type="String" />
    > <asp:parameter Name="Original_PrincipalMailingAddr1"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalMailingAddr2"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalMailingAddr3"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalCity" Type="String" />
    > <asp:parameter Name="Original_PrincipalStateID" Type="Int32" />
    > <asp:parameter Name="Original_PrincipalPostalCode" Type="String"
    > />
    > <asp:parameter Name="Original_PrincipalCountryID" Type="Int32" />
    > <asp:parameter Name="Original_PrincipalPhoneNumber"
    > Type="String" />
    > <asp:parameter Name="Original_PrincipalPhoneExt" Type="String" />
    > <asp:parameter Name="Original_PrincipalEMail" Type="String" />
    > <asp:parameter Name="Original_RealEstateInDelaware" Type="Int32"
    > />
    > <asp:parameter Name="Original_TaxPaidOnRealEstate" Type="Int32" />
    > <asp:parameter Name="Original_NumDirectors" Type="Int16" />
    > <asp:parameter Name="Original_NoAppointedOfficer" Type="Boolean"
    > />
    > <asp:parameter Name="Original_NoElectedDirectors" Type="Boolean"
    > />
    > <asp:parameter Name="Original_DirectorsPDF" Type="String" />
    > <asp:parameter Name="Original_Mark" Type="String" />
    > <asp:parameter Name="Original_Title" Type="String" />
    > <asp:parameter Name="Original_MarkMailingAddr1" Type="String" />
    > <asp:parameter Name="Original_MarkMailingAddr2" Type="String" />
    > <asp:parameter Name="Original_MarkMailingAddr3" Type="String" />
    > <asp:parameter Name="Original_MarkCity" Type="String" />
    > <asp:parameter Name="Original_MarkStateID" Type="Int32" />
    > <asp:parameter Name="Original_MarkPostalCode" Type="String" />
    > <asp:parameter Name="Original_MarkCountryID" Type="Int32" />
    > <asp:parameter Name="Original_Date" Type="DateTime" />
    > <asp:parameter Name="CompanyID" Type="Int32" />
    > </UpdateParameters>
    > <InsertParameters>
    > <asp:parameter Name="ClientID" Type="Int32" />
    > <asp:parameter Name="FilerID" Type="Int32" />
    > <asp:parameter Name="FileNumber" Type="Int32" />
    > <asp:parameter Name="TaxType" Type="String" />
    > <asp:parameter Name="FederalID" Type="Int32" />
    > <asp:parameter Name="PhoneNumber" Type="String" />
    > <asp:parameter Name="InactivityFromDate" Type="DateTime" />
    > <asp:parameter Name="InactivityToDate" Type="DateTime" />
    > <asp:parameter Name="RegulatedInvestAssetJan1" Type="Int64" />
    > <asp:parameter Name="RegulatedInvestAssetDec31" Type="Int64" />
    > <asp:parameter Name="FranchiseTax" Type="Decimal" />
    > <asp:parameter Name="Penalty" Type="Decimal" />
    > <asp:parameter Name="Interest" Type="Decimal" />
    > <asp:parameter Name="FilingFee" Type="Decimal" />
    > <asp:parameter Name="CheckCharge" Type="Decimal" />
    > <asp:parameter Name="CrOrPrePaid" Type="Decimal" />
    > <asp:parameter Name="AmountDue" Type="Decimal" />
    > <asp:parameter Name="AmountPaid" Type="Decimal" />
    > <asp:parameter Name="TaxYear" Type="Int16" />
    > <asp:parameter Name="NatureBusiness" Type="String" />
    > <asp:parameter Name="PrincipalMailingAddr1" Type="String" />
    > <asp:parameter Name="PrincipalMailingAddr2" Type="String" />
    > <asp:parameter Name="PrincipalMailingAddr3" Type="String" />
    > <asp:parameter Name="PrincipalCity" Type="String" />
    > <asp:parameter Name="PrincipalStateID" Type="Int32" />
    > <asp:parameter Name="PrincipalPostalCode" Type="String" />
    > <asp:parameter Name="PrincipalCountryID" Type="Int32" />
    > <asp:parameter Name="PrincipalPhoneNumber" Type="String" />
    > <asp:parameter Name="PrincipalPhoneExt" Type="String" />
    > <asp:parameter Name="PrincipalEMail" Type="String" />
    > <asp:parameter Name="RealEstateInDelaware" Type="Int32" />
    > <asp:parameter Name="TaxPaidOnRealEstate" Type="Int32" />
    > <asp:parameter Name="NumDirectors" Type="Int16" />
    > <asp:parameter Name="NoAppointedOfficer" Type="Boolean" />
    > <asp:parameter Name="NoElectedDirectors" Type="Boolean" />
    > <asp:parameter Name="DirectorsPDF" Type="String" />
    > <asp:parameter Name="Mark" Type="String" />
    > <asp:parameter Name="Title" Type="String" />
    > <asp:parameter Name="MarkMailingAddr1" Type="String" />
    > <asp:parameter Name="MarkMailingAddr2" Type="String" />
    > <asp:parameter Name="MarkMailingAddr3" Type="String" />
    > <asp:parameter Name="MarkCity" Type="String" />
    > <asp:parameter Name="MarkStateID" Type="Int32" />
    > <asp:parameter Name="MarkPostalCode" Type="String" />
    > <asp:parameter Name="MarkCountryID" Type="Int32" />
    > <asp:parameter Name="Date" Type="DateTime" />
    > </InsertParameters>
    > </asp:ObjectDataSource>


    The Officers table will contain a foreign key (e.g. CompanyID)
    pointing to a unique record in the Companies table. When entering
    records (or rows) into the Officers table, the foreign key to the
    Companies table does not necessarily have to be entered at the same
    time, but will need to be updated at some point after the new Officer
    entry process. Other processes involving the new Officers could be
    carried out if required pending the completion of Company data entry.

    To facilitate this the Company ID field could be left null or contain
    some default value to show it has not yet been allocated. A query
    based on this could be used to present the operator with a list of
    Officers with unallocated Companies, as part of a subsequent data
    entry process carried out after the new Company records have been
    entered.

    Any use?
    Phil H, Dec 8, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Airig
    Replies:
    0
    Views:
    790
    Luke Airig
    Dec 31, 2003
  2. Jeff Rodriguez
    Replies:
    23
    Views:
    1,119
    David Schwartz
    Dec 9, 2003
  3. tom c
    Replies:
    0
    Views:
    456
    tom c
    Sep 19, 2006
  4. Replies:
    0
    Views:
    369
  5. David Ching
    Replies:
    0
    Views:
    382
    David Ching
    Aug 29, 2007
Loading...

Share This Page