SqlDataSource and Optimistic Concurrency Problems

Discussion in 'ASP .Net' started by stuart.d.jones@gmail.com, Jan 30, 2006.

  1. Guest

    Hi,

    I'm using a detailsview control with an SqlDataSource control. My
    Update query isn't working, and I've narrowed it down to the optimistic
    concurrency parameters - i.e. when I comment them out of the query, it
    works. What seems to be happening is that if a field is NULL when it
    is read in through the select statement, it's causing the update
    statment not to find a match. I've got ConvertEmptyStringToNull not
    set (so it should default to true), but I can't get the update to work
    all the time and it's driving me crazy.

    Here's my code:

    Stored Procedure for Select as follows (the Update's going in a Stored
    Procedure when I can get it to work...):
    SELECT Customers.CustID, Customers.CustDisplayName,
    Customers.CustFirstName, Customers.CustSurname, Customers.CustType,
    Customers.CustNotes, Customers.CustIsBillingSame,
    Customers.CustNumEmployees, Customers.CustIsProspect,
    Customers.CustOnHold, Customers.CustPersonID,
    Customers.CustUserFieldB1, Customers.CustUserFieldB2,
    Customers.CustUserFieldB3, Customers.CustUserFieldD1,
    Customers.CustUserFieldD2, Customers.CustUserFieldD3,
    Customers.CustUserFieldI1, Customers.CustUserFieldI2,
    Customers.CustUserFieldI3, Customers.CustCategory,
    Customers.CustInactive, CustomerContactDetails_1.CustContactStreet1,
    CustomerContactDetails_1.CustContactStreet2,
    CustomerContactDetails_1.CustContactStreet3,
    CustomerContactDetails_1.CustContactTown,
    CustomerContactDetails_1.CustContactCounty,
    CustomerContactDetails_1.CustContactPostCode,
    CustomerContactDetails_1.CustContactCountry,
    CustomerContactDetails_1.CustContactTelephone,
    CustomerContactDetails_1.CustContactMobile,
    CustomerContactDetails_1.CustContactEMail,
    CustomerContactDetails_1.CustContactFax,
    CustomerContactDetails.CustContactStreet1 AS CustBContactStreet1,
    CustomerContactDetails.CustContactStreet2 AS CustBContactStreet2,
    CustomerContactDetails.CustContactStreet3 AS CustBContactStreet3,
    CustomerContactDetails.CustContactTown AS CustBContactTown,
    CustomerContactDetails.CustContactCounty AS CustBContactCounty,
    CustomerContactDetails.CustContactPostCode AS CustBContactPostCode,
    CustomerContactDetails.CustContactCountry AS CustBContactCountry,
    CustomerContactDetails.CustContactTelephone AS CustBContactTelephone,
    CustomerContactDetails.CustContactMobile AS CustBContactMobile,
    CustomerContactDetails.CustContactEMail AS CustBContactEMail,
    CustomerContactDetails.CustContactFax AS CustBContactFax FROM Customers
    LEFT OUTER JOIN CustomerContactDetails AS CustomerContactDetails_1 ON
    Customers.CustAddressID = CustomerContactDetails_1.CustContactID LEFT
    OUTER JOIN CustomerContactDetails ON Customers.CustBillingID =
    CustomerContactDetails.CustContactID WHERE (Customers.CustID = @CustID)


    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
    ConflictDetection="CompareAllValues"
    ConnectionString="<%$
    ConnectionStrings:FocusSystemsConnectionString %>"
    OldValuesParameterFormatString="original_{0}"
    ProviderName="<%$
    ConnectionStrings:FocusSystemsConnectionString.ProviderName %>"
    SelectCommand="SelectCustomersAndAddresses"
    SelectCommandType="StoredProcedure"
    UpdateCommand="UPDATE [Customers] SET
    [CustDisplayName] = @CustDisplayName, [CustFirstName] = @CustFirstName,
    [CustSurname] = @CustSurname, [CustType] = @CustType, [CustNotes] =
    @CustNotes, [CustIsBillingSame] = @CustIsBillingSame,
    [CustNumEmployees] = @CustNumEmployees, [CustIsProspect] =
    @CustIsProspect, [CustOnHold] = @CustOnHold, [CustPersonID] =
    @CustPersonID, [CustUserFieldB1] = @CustUserFieldB1, [CustUserFieldB2]
    = @CustUserFieldB2, [CustUserFieldB3] = @CustUserFieldB3,
    [CustUserFieldD1] = @CustUserFieldD1, [CustUserFieldD2] =
    @CustUserFieldD2, [CustUserFieldD3] = @CustUserFieldD3,
    [CustUserFieldI1] = @CustUserFieldI1, [CustUserFieldI2] =
    @CustUserFieldI2, [CustUserFieldI3] = @CustUserFieldI3, [CustCategory]
    = @CustCategory, [CustInactive] = @CustInactive WHERE [CustID] =
    @original_CustID AND [CustDisplayName] = @original_CustDisplayName AND
    [CustFirstName] = @original_CustFirstName AND [CustSurname] =
    @original_CustSurname AND [CustType] = @original_CustType AND
    [CustIsBillingSame] = @original_CustIsBillingSame AND
    [CustNumEmployees] = @original_CustNumEmployees AND [CustIsProspect] =
    @original_CustIsProspect AND [CustOnHold] = @original_CustOnHold AND
    [CustPersonID] = @original_CustPersonID AND [CustCategory] =
    @original_CustCategory AND [CustInactive] = @original_CustInactive"
    EnableViewState="true">
    <UpdateParameters>
    <asp:parameter Name="CustDisplayName"
    Type="String" />
    <asp:parameter Name="CustFirstName"
    Type="String" />
    <asp:parameter Name="CustSurname" Type="String"
    />
    <asp:parameter Name="CustType" Type="String" />
    <asp:parameter Name="CustNotes" Type="String"
    />
    <asp:parameter Name="CustIsBillingSame"
    Type="Boolean" />
    <asp:parameter Name="CustNumEmployees"
    Type="Int32" />
    <asp:parameter Name="CustIsProspect"
    Type="Boolean" />
    <asp:parameter Name="CustOnHold" Type="Boolean"
    />
    <asp:parameter Name="CustPersonID" />
    <asp:parameter Name="CustUserFieldB1"
    Type="String" />
    <asp:parameter Name="CustUserFieldB2"
    Type="String" />
    <asp:parameter Name="CustUserFieldB3"
    Type="String" />
    <asp:parameter Name="CustUserFieldD1"
    Type="String" />
    <asp:parameter Name="CustUserFieldD2"
    Type="String" />
    <asp:parameter Name="CustUserFieldD3"
    Type="String" />
    <asp:parameter Name="CustUserFieldI1"
    Type="String" />
    <asp:parameter Name="CustUserFieldI2"
    Type="String" />
    <asp:parameter Name="CustUserFieldI3"
    Type="String" />
    <asp:parameter Name="CustCategory"
    Type="String" />
    <asp:parameter Name="CustInactive"
    Type="Boolean" />
    <asp:parameter Name="original_CustID" />
    <asp:parameter Name="original_CustDisplayName"
    />
    <asp:parameter Name="original_CustFirstName" />
    <asp:parameter Name="original_CustSurname" />
    <asp:parameter Name="original_CustType" />
    <asp:parameter Name="original_CustNotes" />
    <asp:parameter
    Name="original_CustIsBillingSame" />
    <asp:parameter Name="original_CustNumEmployees"
    />
    <asp:parameter Name="original_CustIsProspect"
    />
    <asp:parameter Name="original_CustOnHold" />
    <asp:parameter Name="original_CustPersonID" />
    <asp:parameter Name="original_CustUserFieldB1"
    />
    <asp:parameter Name="original_CustUserFieldB2"
    />
    <asp:parameter Name="original_CustUserFieldB3"
    />
    <asp:parameter Name="original_CustUserFieldD1"
    />
    <asp:parameter Name="original_CustUserFieldD2"
    />
    <asp:parameter Name="original_CustUserFieldD3"
    />
    <asp:parameter Name="original_CustUserFieldI1"
    />
    <asp:parameter Name="original_CustUserFieldI2"
    />
    <asp:parameter Name="original_CustUserFieldI3"
    />
    <asp:parameter Name="original_CustCategory" />
    <asp:parameter Name="original_CustInactive" />
    <asp:parameter Name="CustContactStreet1"
    Type="String" />
    <asp:parameter Name="CustContactStreet2"
    Type="String" />
    <asp:parameter Name="CustContactStreet3"
    Type="String" />
    <asp:parameter Name="CustContactTown"
    Type="String" />
    <asp:parameter Name="CustContactCounty"
    Type="String" />
    <asp:parameter Name="CustContactPostCode"
    Type="String" />
    <asp:parameter Name="CustContactCountry"
    Type="String" />
    <asp:parameter Name="CustContactTelephone"
    Type="String" />
    <asp:parameter Name="CustContactMobile"
    Type="String" />
    <asp:parameter Name="CustContactEMail"
    Type="String" />
    <asp:parameter Name="CustContactFax"
    Type="String" />
    <asp:parameter
    Name="original_CustContactStreet1" Type="String" />
    <asp:parameter
    Name="original_CustContactStreet2" Type="String" />
    <asp:parameter
    Name="original_CustContactStreet3" Type="String" />
    <asp:parameter Name="original_CustContactTown"
    Type="String" />
    <asp:parameter
    Name="original_CustContactCounty" Type="String" />
    <asp:parameter
    Name="original_CustContactPostCode" Type="String" />
    <asp:parameter
    Name="original_CustContactCountry" Type="String" />
    <asp:parameter
    Name="original_CustContactTelephone" Type="String" />
    <asp:parameter
    Name="original_CustContactMobile" Type="String" />
    <asp:parameter Name="original_CustContactEMail"
    Type="String" />
    <asp:parameter Name="original_CustContactFax"
    Type="String" />
    <asp:parameter Name="CustBContactStreet1"
    Type="String" />
    <asp:parameter Name="CustBContactStreet2"
    Type="String" />
    <asp:parameter Name="CustBContactStreet3"
    Type="String" />
    <asp:parameter Name="CustBContactTown"
    Type="String" />
    <asp:parameter Name="CustBContactCounty"
    Type="String" />
    <asp:parameter Name="CustBContactPostCode"
    Type="String" />
    <asp:parameter Name="CustBContactCountry"
    Type="String" />
    <asp:parameter Name="CustBContactTelephone"
    Type="String" />
    <asp:parameter Name="CustBContactMobile"
    Type="String" />
    <asp:parameter Name="CustBContactEMail"
    Type="String" />
    <asp:parameter Name="CustBContactFax"
    Type="String" />
    <asp:parameter
    Name="original_CustBContactStreet1" Type="String" />
    <asp:parameter
    Name="original_CustBContactStreet2" Type="String" />
    <asp:parameter
    Name="original_CustBContactStreet3" Type="String" />
    <asp:parameter Name="original_CustBContactTown"
    Type="String" />
    <asp:parameter
    Name="original_CustBContactCounty" Type="String" />
    <asp:parameter
    Name="original_CustBContactPostCode" Type="String" />
    <asp:parameter
    Name="original_CustBContactCountry" Type="String" />
    <asp:parameter
    Name="original_CustBContactTelephone" Type="String" />
    <asp:parameter
    Name="original_CustBContactMobile" Type="String" />
    <asp:parameter
    Name="original_CustBContactEMail" Type="String" />
    <asp:parameter Name="original_CustBContactFax"
    Type="String" />
    </UpdateParameters>
    <SelectParameters>
    <asp:ControlParameter
    ControlID="CustNameSelect" Name="CustID" PropertyName="SelectedValue"
    />
    </SelectParameters>
    </asp:SqlDataSource>
    </td>
    </tr>
    <tr><td>
    <asp:DetailsView ID="DetailsView1" runat="server"
    AutoGenerateRows="False" DataSourceID="SqlDataSource2"
    Height="50px" Width="125px" DataKeyNames="CustID">
    <Fields>
    <asp:BoundField DataField="CustID"
    HeaderText="CustID" ReadOnly="True" SortExpression="CustID" />
    <asp:BoundField DataField="CustDisplayName"
    HeaderText="CustDisplayName" SortExpression="CustDisplayName" />
    <asp:BoundField DataField="CustFirstName"
    HeaderText="CustFirstName" SortExpression="CustFirstName" />
    <asp:BoundField DataField="CustSurname"
    HeaderText="CustSurname" SortExpression="CustSurname" />
    <asp:BoundField DataField="CustType"
    HeaderText="CustType" SortExpression="CustType" />
    <asp:BoundField DataField="CustNotes"
    HeaderText="CustNotes" SortExpression="CustNotes" />
    <asp:CheckBoxField DataField="CustIsBillingSame"
    HeaderText="CustIsBillingSame" SortExpression="CustIsBillingSame" />
    <asp:BoundField DataField="CustNumEmployees"
    HeaderText="CustNumEmployees" SortExpression="CustNumEmployees" />
    <asp:CheckBoxField DataField="CustIsProspect"
    HeaderText="CustIsProspect" SortExpression="CustIsProspect" />
    <asp:CheckBoxField DataField="CustOnHold"
    HeaderText="CustOnHold" SortExpression="CustOnHold" />
    <asp:BoundField DataField="CustPersonID"
    HeaderText="CustPersonID" SortExpression="CustPersonID" />
    <asp:BoundField DataField="CustUserFieldB1"
    HeaderText="CustUserFieldB1" SortExpression="CustUserFieldB1" />
    <asp:BoundField DataField="CustUserFieldB2"
    HeaderText="CustUserFieldB2" SortExpression="CustUserFieldB2" />
    <asp:BoundField DataField="CustUserFieldB3"
    HeaderText="CustUserFieldB3" SortExpression="CustUserFieldB3" />
    <asp:BoundField DataField="CustUserFieldD1"
    HeaderText="CustUserFieldD1" SortExpression="CustUserFieldD1" />
    <asp:BoundField DataField="CustUserFieldD2"
    HeaderText="CustUserFieldD2" SortExpression="CustUserFieldD2" />
    <asp:BoundField DataField="CustUserFieldD3"
    HeaderText="CustUserFieldD3" SortExpression="CustUserFieldD3" />
    <asp:BoundField DataField="CustUserFieldI1"
    HeaderText="CustUserFieldI1" SortExpression="CustUserFieldI1" />
    <asp:BoundField DataField="CustUserFieldI2"
    HeaderText="CustUserFieldI2" SortExpression="CustUserFieldI2" />
    <asp:BoundField DataField="CustUserFieldI3"
    HeaderText="CustUserFieldI3" SortExpression="CustUserFieldI3" />
    <asp:BoundField DataField="CustCategory"
    HeaderText="CustCategory" SortExpression="CustCategory" />
    <asp:CheckBoxField DataField="CustInactive"
    HeaderText="CustInactive" SortExpression="CustInactive" />
    <asp:BoundField DataField="CustContactStreet1"
    HeaderText="CustContactStreet1" SortExpression="CustContactStreet1" />
    <asp:BoundField DataField="CustContactStreet2"
    HeaderText="CustContactStreet2" SortExpression="CustContactStreet2" />
    <asp:BoundField DataField="CustContactStreet3"
    HeaderText="CustContactStreet3" SortExpression="CustContactStreet3" />
    <asp:BoundField DataField="CustContactTown"
    HeaderText="CustContactTown" SortExpression="CustContactTown" />
    <asp:BoundField DataField="CustContactCounty"
    HeaderText="CustContactCounty" SortExpression="CustContactCounty" />
    <asp:BoundField DataField="CustContactPostCode"
    HeaderText="CustContactPostCode"
    SortExpression="CustContactPostCode" />
    <asp:BoundField DataField="CustContactCountry"
    HeaderText="CustContactCountry" SortExpression="CustContactCountry" />
    <asp:BoundField DataField="CustContactTelephone"
    HeaderText="CustContactTelephone"
    SortExpression="CustContactTelephone" />
    <asp:BoundField DataField="CustContactMobile"
    HeaderText="CustContactMobile" SortExpression="CustContactMobile" />
    <asp:BoundField DataField="CustContactEMail"
    HeaderText="CustContactEMail" SortExpression="CustContactEMail" />
    <asp:BoundField DataField="CustContactFax"
    HeaderText="CustContactFax" SortExpression="CustContactFax" />
    <asp:BoundField DataField="CustBContactStreet1"
    HeaderText="CustBContactStreet1"
    SortExpression="CustBContactStreet1" />
    <asp:BoundField DataField="CustBContactStreet2"
    HeaderText="CustBContactStreet2"
    SortExpression="CustBContactStreet2" />
    <asp:BoundField DataField="CustBContactStreet3"
    HeaderText="CustBContactStreet3"
    SortExpression="CustBContactStreet3" />
    <asp:BoundField DataField="CustBContactTown"
    HeaderText="CustBContactTown" SortExpression="CustBContactTown" />
    <asp:BoundField DataField="CustBContactCounty"
    HeaderText="CustBContactCounty" SortExpression="CustBContactCounty" />
    <asp:BoundField DataField="CustBContactPostCode"
    HeaderText="CustBContactPostCode"
    SortExpression="CustBContactPostCode" />
    <asp:BoundField DataField="CustBContactCountry"
    HeaderText="CustBContactCountry"
    SortExpression="CustBContactCountry" />
    <asp:BoundField DataField="CustBContactTelephone"
    HeaderText="CustBContactTelephone"
    SortExpression="CustBContactTelephone" />
    <asp:BoundField DataField="CustBContactMobile"
    HeaderText="CustBContactMobile" SortExpression="CustBContactMobile" />
    <asp:BoundField DataField="CustBContactEMail"
    HeaderText="CustBContactEMail" SortExpression="CustBContactEMail" />
    <asp:BoundField DataField="CustBContactFax"
    HeaderText="CustBContactFax" SortExpression="CustBContactFax" />
    <asp:CommandField ShowEditButton="True" />
    </Fields>
    </asp:DetailsView>
    , Jan 30, 2006
    #1
    1. Advertising

  2. When you say it isn't working, is it throwing an exception or is it just not
    updating. From the looks of the Update query if I'm reading it correctly,
    there's no where clause to specify which row you're going to update. Is that
    intentional?
    <> wrote in message
    news:...
    > Hi,
    >
    > I'm using a detailsview control with an SqlDataSource control. My
    > Update query isn't working, and I've narrowed it down to the optimistic
    > concurrency parameters - i.e. when I comment them out of the query, it
    > works. What seems to be happening is that if a field is NULL when it
    > is read in through the select statement, it's causing the update
    > statment not to find a match. I've got ConvertEmptyStringToNull not
    > set (so it should default to true), but I can't get the update to work
    > all the time and it's driving me crazy.
    >
    > Here's my code:
    >
    > Stored Procedure for Select as follows (the Update's going in a Stored
    > Procedure when I can get it to work...):
    > SELECT Customers.CustID, Customers.CustDisplayName,
    > Customers.CustFirstName, Customers.CustSurname, Customers.CustType,
    > Customers.CustNotes, Customers.CustIsBillingSame,
    > Customers.CustNumEmployees, Customers.CustIsProspect,
    > Customers.CustOnHold, Customers.CustPersonID,
    > Customers.CustUserFieldB1, Customers.CustUserFieldB2,
    > Customers.CustUserFieldB3, Customers.CustUserFieldD1,
    > Customers.CustUserFieldD2, Customers.CustUserFieldD3,
    > Customers.CustUserFieldI1, Customers.CustUserFieldI2,
    > Customers.CustUserFieldI3, Customers.CustCategory,
    > Customers.CustInactive, CustomerContactDetails_1.CustContactStreet1,
    > CustomerContactDetails_1.CustContactStreet2,
    > CustomerContactDetails_1.CustContactStreet3,
    > CustomerContactDetails_1.CustContactTown,
    > CustomerContactDetails_1.CustContactCounty,
    > CustomerContactDetails_1.CustContactPostCode,
    > CustomerContactDetails_1.CustContactCountry,
    > CustomerContactDetails_1.CustContactTelephone,
    > CustomerContactDetails_1.CustContactMobile,
    > CustomerContactDetails_1.CustContactEMail,
    > CustomerContactDetails_1.CustContactFax,
    > CustomerContactDetails.CustContactStreet1 AS CustBContactStreet1,
    > CustomerContactDetails.CustContactStreet2 AS CustBContactStreet2,
    > CustomerContactDetails.CustContactStreet3 AS CustBContactStreet3,
    > CustomerContactDetails.CustContactTown AS CustBContactTown,
    > CustomerContactDetails.CustContactCounty AS CustBContactCounty,
    > CustomerContactDetails.CustContactPostCode AS CustBContactPostCode,
    > CustomerContactDetails.CustContactCountry AS CustBContactCountry,
    > CustomerContactDetails.CustContactTelephone AS CustBContactTelephone,
    > CustomerContactDetails.CustContactMobile AS CustBContactMobile,
    > CustomerContactDetails.CustContactEMail AS CustBContactEMail,
    > CustomerContactDetails.CustContactFax AS CustBContactFax FROM Customers
    > LEFT OUTER JOIN CustomerContactDetails AS CustomerContactDetails_1 ON
    > Customers.CustAddressID = CustomerContactDetails_1.CustContactID LEFT
    > OUTER JOIN CustomerContactDetails ON Customers.CustBillingID =
    > CustomerContactDetails.CustContactID WHERE (Customers.CustID = @CustID)
    >
    >
    > <asp:SqlDataSource ID="SqlDataSource2" runat="server"
    > ConflictDetection="CompareAllValues"
    > ConnectionString="<%$
    > ConnectionStrings:FocusSystemsConnectionString %>"
    > OldValuesParameterFormatString="original_{0}"
    > ProviderName="<%$
    > ConnectionStrings:FocusSystemsConnectionString.ProviderName %>"
    > SelectCommand="SelectCustomersAndAddresses"
    > SelectCommandType="StoredProcedure"
    > UpdateCommand="UPDATE [Customers] SET
    > [CustDisplayName] = @CustDisplayName, [CustFirstName] = @CustFirstName,
    > [CustSurname] = @CustSurname, [CustType] = @CustType, [CustNotes] =
    > @CustNotes, [CustIsBillingSame] = @CustIsBillingSame,
    > [CustNumEmployees] = @CustNumEmployees, [CustIsProspect] =
    > @CustIsProspect, [CustOnHold] = @CustOnHold, [CustPersonID] =
    > @CustPersonID, [CustUserFieldB1] = @CustUserFieldB1, [CustUserFieldB2]
    > = @CustUserFieldB2, [CustUserFieldB3] = @CustUserFieldB3,
    > [CustUserFieldD1] = @CustUserFieldD1, [CustUserFieldD2] =
    > @CustUserFieldD2, [CustUserFieldD3] = @CustUserFieldD3,
    > [CustUserFieldI1] = @CustUserFieldI1, [CustUserFieldI2] =
    > @CustUserFieldI2, [CustUserFieldI3] = @CustUserFieldI3, [CustCategory]
    > = @CustCategory, [CustInactive] = @CustInactive WHERE [CustID] =
    > @original_CustID AND [CustDisplayName] = @original_CustDisplayName AND
    > [CustFirstName] = @original_CustFirstName AND [CustSurname] =
    > @original_CustSurname AND [CustType] = @original_CustType AND
    > [CustIsBillingSame] = @original_CustIsBillingSame AND
    > [CustNumEmployees] = @original_CustNumEmployees AND [CustIsProspect] =
    > @original_CustIsProspect AND [CustOnHold] = @original_CustOnHold AND
    > [CustPersonID] = @original_CustPersonID AND [CustCategory] =
    > @original_CustCategory AND [CustInactive] = @original_CustInactive"
    > EnableViewState="true">
    > <UpdateParameters>
    > <asp:parameter Name="CustDisplayName"
    > Type="String" />
    > <asp:parameter Name="CustFirstName"
    > Type="String" />
    > <asp:parameter Name="CustSurname" Type="String"
    > />
    > <asp:parameter Name="CustType" Type="String" />
    > <asp:parameter Name="CustNotes" Type="String"
    > />
    > <asp:parameter Name="CustIsBillingSame"
    > Type="Boolean" />
    > <asp:parameter Name="CustNumEmployees"
    > Type="Int32" />
    > <asp:parameter Name="CustIsProspect"
    > Type="Boolean" />
    > <asp:parameter Name="CustOnHold" Type="Boolean"
    > />
    > <asp:parameter Name="CustPersonID" />
    > <asp:parameter Name="CustUserFieldB1"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldB2"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldB3"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldD1"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldD2"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldD3"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldI1"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldI2"
    > Type="String" />
    > <asp:parameter Name="CustUserFieldI3"
    > Type="String" />
    > <asp:parameter Name="CustCategory"
    > Type="String" />
    > <asp:parameter Name="CustInactive"
    > Type="Boolean" />
    > <asp:parameter Name="original_CustID" />
    > <asp:parameter Name="original_CustDisplayName"
    > />
    > <asp:parameter Name="original_CustFirstName" />
    > <asp:parameter Name="original_CustSurname" />
    > <asp:parameter Name="original_CustType" />
    > <asp:parameter Name="original_CustNotes" />
    > <asp:parameter
    > Name="original_CustIsBillingSame" />
    > <asp:parameter Name="original_CustNumEmployees"
    > />
    > <asp:parameter Name="original_CustIsProspect"
    > />
    > <asp:parameter Name="original_CustOnHold" />
    > <asp:parameter Name="original_CustPersonID" />
    > <asp:parameter Name="original_CustUserFieldB1"
    > />
    > <asp:parameter Name="original_CustUserFieldB2"
    > />
    > <asp:parameter Name="original_CustUserFieldB3"
    > />
    > <asp:parameter Name="original_CustUserFieldD1"
    > />
    > <asp:parameter Name="original_CustUserFieldD2"
    > />
    > <asp:parameter Name="original_CustUserFieldD3"
    > />
    > <asp:parameter Name="original_CustUserFieldI1"
    > />
    > <asp:parameter Name="original_CustUserFieldI2"
    > />
    > <asp:parameter Name="original_CustUserFieldI3"
    > />
    > <asp:parameter Name="original_CustCategory" />
    > <asp:parameter Name="original_CustInactive" />
    > <asp:parameter Name="CustContactStreet1"
    > Type="String" />
    > <asp:parameter Name="CustContactStreet2"
    > Type="String" />
    > <asp:parameter Name="CustContactStreet3"
    > Type="String" />
    > <asp:parameter Name="CustContactTown"
    > Type="String" />
    > <asp:parameter Name="CustContactCounty"
    > Type="String" />
    > <asp:parameter Name="CustContactPostCode"
    > Type="String" />
    > <asp:parameter Name="CustContactCountry"
    > Type="String" />
    > <asp:parameter Name="CustContactTelephone"
    > Type="String" />
    > <asp:parameter Name="CustContactMobile"
    > Type="String" />
    > <asp:parameter Name="CustContactEMail"
    > Type="String" />
    > <asp:parameter Name="CustContactFax"
    > Type="String" />
    > <asp:parameter
    > Name="original_CustContactStreet1" Type="String" />
    > <asp:parameter
    > Name="original_CustContactStreet2" Type="String" />
    > <asp:parameter
    > Name="original_CustContactStreet3" Type="String" />
    > <asp:parameter Name="original_CustContactTown"
    > Type="String" />
    > <asp:parameter
    > Name="original_CustContactCounty" Type="String" />
    > <asp:parameter
    > Name="original_CustContactPostCode" Type="String" />
    > <asp:parameter
    > Name="original_CustContactCountry" Type="String" />
    > <asp:parameter
    > Name="original_CustContactTelephone" Type="String" />
    > <asp:parameter
    > Name="original_CustContactMobile" Type="String" />
    > <asp:parameter Name="original_CustContactEMail"
    > Type="String" />
    > <asp:parameter Name="original_CustContactFax"
    > Type="String" />
    > <asp:parameter Name="CustBContactStreet1"
    > Type="String" />
    > <asp:parameter Name="CustBContactStreet2"
    > Type="String" />
    > <asp:parameter Name="CustBContactStreet3"
    > Type="String" />
    > <asp:parameter Name="CustBContactTown"
    > Type="String" />
    > <asp:parameter Name="CustBContactCounty"
    > Type="String" />
    > <asp:parameter Name="CustBContactPostCode"
    > Type="String" />
    > <asp:parameter Name="CustBContactCountry"
    > Type="String" />
    > <asp:parameter Name="CustBContactTelephone"
    > Type="String" />
    > <asp:parameter Name="CustBContactMobile"
    > Type="String" />
    > <asp:parameter Name="CustBContactEMail"
    > Type="String" />
    > <asp:parameter Name="CustBContactFax"
    > Type="String" />
    > <asp:parameter
    > Name="original_CustBContactStreet1" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactStreet2" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactStreet3" Type="String" />
    > <asp:parameter Name="original_CustBContactTown"
    > Type="String" />
    > <asp:parameter
    > Name="original_CustBContactCounty" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactPostCode" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactCountry" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactTelephone" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactMobile" Type="String" />
    > <asp:parameter
    > Name="original_CustBContactEMail" Type="String" />
    > <asp:parameter Name="original_CustBContactFax"
    > Type="String" />
    > </UpdateParameters>
    > <SelectParameters>
    > <asp:ControlParameter
    > ControlID="CustNameSelect" Name="CustID" PropertyName="SelectedValue"
    > />
    > </SelectParameters>
    > </asp:SqlDataSource>
    > </td>
    > </tr>
    > <tr><td>
    > <asp:DetailsView ID="DetailsView1" runat="server"
    > AutoGenerateRows="False" DataSourceID="SqlDataSource2"
    > Height="50px" Width="125px" DataKeyNames="CustID">
    > <Fields>
    > <asp:BoundField DataField="CustID"
    > HeaderText="CustID" ReadOnly="True" SortExpression="CustID" />
    > <asp:BoundField DataField="CustDisplayName"
    > HeaderText="CustDisplayName" SortExpression="CustDisplayName" />
    > <asp:BoundField DataField="CustFirstName"
    > HeaderText="CustFirstName" SortExpression="CustFirstName" />
    > <asp:BoundField DataField="CustSurname"
    > HeaderText="CustSurname" SortExpression="CustSurname" />
    > <asp:BoundField DataField="CustType"
    > HeaderText="CustType" SortExpression="CustType" />
    > <asp:BoundField DataField="CustNotes"
    > HeaderText="CustNotes" SortExpression="CustNotes" />
    > <asp:CheckBoxField DataField="CustIsBillingSame"
    > HeaderText="CustIsBillingSame" SortExpression="CustIsBillingSame" />
    > <asp:BoundField DataField="CustNumEmployees"
    > HeaderText="CustNumEmployees" SortExpression="CustNumEmployees" />
    > <asp:CheckBoxField DataField="CustIsProspect"
    > HeaderText="CustIsProspect" SortExpression="CustIsProspect" />
    > <asp:CheckBoxField DataField="CustOnHold"
    > HeaderText="CustOnHold" SortExpression="CustOnHold" />
    > <asp:BoundField DataField="CustPersonID"
    > HeaderText="CustPersonID" SortExpression="CustPersonID" />
    > <asp:BoundField DataField="CustUserFieldB1"
    > HeaderText="CustUserFieldB1" SortExpression="CustUserFieldB1" />
    > <asp:BoundField DataField="CustUserFieldB2"
    > HeaderText="CustUserFieldB2" SortExpression="CustUserFieldB2" />
    > <asp:BoundField DataField="CustUserFieldB3"
    > HeaderText="CustUserFieldB3" SortExpression="CustUserFieldB3" />
    > <asp:BoundField DataField="CustUserFieldD1"
    > HeaderText="CustUserFieldD1" SortExpression="CustUserFieldD1" />
    > <asp:BoundField DataField="CustUserFieldD2"
    > HeaderText="CustUserFieldD2" SortExpression="CustUserFieldD2" />
    > <asp:BoundField DataField="CustUserFieldD3"
    > HeaderText="CustUserFieldD3" SortExpression="CustUserFieldD3" />
    > <asp:BoundField DataField="CustUserFieldI1"
    > HeaderText="CustUserFieldI1" SortExpression="CustUserFieldI1" />
    > <asp:BoundField DataField="CustUserFieldI2"
    > HeaderText="CustUserFieldI2" SortExpression="CustUserFieldI2" />
    > <asp:BoundField DataField="CustUserFieldI3"
    > HeaderText="CustUserFieldI3" SortExpression="CustUserFieldI3" />
    > <asp:BoundField DataField="CustCategory"
    > HeaderText="CustCategory" SortExpression="CustCategory" />
    > <asp:CheckBoxField DataField="CustInactive"
    > HeaderText="CustInactive" SortExpression="CustInactive" />
    > <asp:BoundField DataField="CustContactStreet1"
    > HeaderText="CustContactStreet1" SortExpression="CustContactStreet1" />
    > <asp:BoundField DataField="CustContactStreet2"
    > HeaderText="CustContactStreet2" SortExpression="CustContactStreet2" />
    > <asp:BoundField DataField="CustContactStreet3"
    > HeaderText="CustContactStreet3" SortExpression="CustContactStreet3" />
    > <asp:BoundField DataField="CustContactTown"
    > HeaderText="CustContactTown" SortExpression="CustContactTown" />
    > <asp:BoundField DataField="CustContactCounty"
    > HeaderText="CustContactCounty" SortExpression="CustContactCounty" />
    > <asp:BoundField DataField="CustContactPostCode"
    > HeaderText="CustContactPostCode"
    > SortExpression="CustContactPostCode" />
    > <asp:BoundField DataField="CustContactCountry"
    > HeaderText="CustContactCountry" SortExpression="CustContactCountry" />
    > <asp:BoundField DataField="CustContactTelephone"
    > HeaderText="CustContactTelephone"
    > SortExpression="CustContactTelephone" />
    > <asp:BoundField DataField="CustContactMobile"
    >HeaderText="CustContactMobile" SortExpression="CustContactMobile" />
    > <asp:BoundField DataField="CustContactEMail"
    > HeaderText="CustContactEMail" SortExpression="CustContactEMail" />
    > <asp:BoundField DataField="CustContactFax"
    > HeaderText="CustContactFax" SortExpression="CustContactFax" />
    > <asp:BoundField DataField="CustBContactStreet1"
    > HeaderText="CustBContactStreet1"
    > SortExpression="CustBContactStreet1" />
    > <asp:BoundField DataField="CustBContactStreet2"
    > HeaderText="CustBContactStreet2"
    > SortExpression="CustBContactStreet2" />
    > <asp:BoundField DataField="CustBContactStreet3"
    > HeaderText="CustBContactStreet3"
    > SortExpression="CustBContactStreet3" />
    > <asp:BoundField DataField="CustBContactTown"
    > HeaderText="CustBContactTown" SortExpression="CustBContactTown" />
    > <asp:BoundField DataField="CustBContactCounty"
    > HeaderText="CustBContactCounty" SortExpression="CustBContactCounty" />
    > <asp:BoundField DataField="CustBContactPostCode"
    > HeaderText="CustBContactPostCode"
    > SortExpression="CustBContactPostCode" />
    > <asp:BoundField DataField="CustBContactCountry"
    > HeaderText="CustBContactCountry"
    > SortExpression="CustBContactCountry" />
    > <asp:BoundField DataField="CustBContactTelephone"
    > HeaderText="CustBContactTelephone"
    > SortExpression="CustBContactTelephone" />
    > <asp:BoundField DataField="CustBContactMobile"
    > HeaderText="CustBContactMobile" SortExpression="CustBContactMobile" />
    > <asp:BoundField DataField="CustBContactEMail"
    > HeaderText="CustBContactEMail" SortExpression="CustBContactEMail" />
    > <asp:BoundField DataField="CustBContactFax"
    > HeaderText="CustBContactFax" SortExpression="CustBContactFax" />
    > <asp:CommandField ShowEditButton="True" />
    > </Fields>
    > </asp:DetailsView>
    >
    W.G. Ryan - MVP, Jan 30, 2006
    #2
    1. Advertising

  3. Guest

    It's just not updating. I'm going to try a timestamp concurrency
    approach instead (came to me at 4AM this morning), unless anyone can
    better advise!

    Thanks,

    Stuart
    , Jan 31, 2006
    #3
    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. =?Utf-8?B?TWlrZSBLZWxseQ==?=

    Optimistic concurrency in custom GridView/SqlDataSource

    =?Utf-8?B?TWlrZSBLZWxseQ==?=, Nov 10, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    2,216
    Jason
    Jan 4, 2006
  2. Replies:
    0
    Views:
    516
  3. Andrew Robinson

    Optimistic Concurrency in a web app

    Andrew Robinson, Jan 31, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    425
    Steven Cheng[MSFT]
    Feb 5, 2007
  4. B. Chernick
    Replies:
    1
    Views:
    329
    B. Chernick
    Dec 18, 2007
  5. B. Chernick
    Replies:
    4
    Views:
    673
    B. Chernick
    Dec 18, 2007
Loading...

Share This Page