specified that delete command compares all values on SqlDataSource

Discussion in 'ASP .Net' started by =?Utf-8?B?RWQ=?=, Apr 18, 2006.

  1. All of a sudden my previously working code started throwing this error. from
    the SqlDatasource. I am using C# and Asp.net 2.0.

    Getting the following error:

    You have specified that your delete command compares all values on
    SqlDataSource 'sdsAddEdit', but the dictionary passed in for values is empty.
    Pass in a valid dictionary for delete or change your mode to
    OverwriteChanges.

    Here is my markup. Any suggestions. This is a framework error that seems
    to occur before a call to the database is made.

    <asp:SqlDataSource ID="sdsAddEdit" runat="server"
    ConflictDetection="CompareAllValues" ConnectionString="<%$
    ConnectionStrings:centiv_nexiv2 %>"

    OnUpdating="sdsAddEdit_Updating"
    DeleteCommand="UPDATE [wws_logolocker] SET [active] = 0
    WHERE [pk] = @pk "
    InsertCommand="exec dbo.SP_WW_NEWID 'wws_logolocker', @pk
    output; INSERT INTO [wws_logolocker] ([pk], [corpid], [active], [descript],
    [image], [sSVGImage]) VALUES (@pk, @corpid, @active, @descript, @image,
    @sSVGImage); Select @pk = Scope_Identity()"
    SelectCommand="SELECT [pk], [corpid], [custpk], [active],
    [descript], [image], ISNULL([sSVGImage],'') AS sSVGImage, [bAllDistUsers],
    [LanguageID], CASE WHEN Charindex('.ai',[image]) > 0 THEN Left([image],
    CharIndex('.ai', [image]) - 1) WHEN Charindex('.cdr',[image]) > 0 THEN
    Left([image], CharIndex('.cdr', [image]) - 1) WHEN Charindex('.jpg',[image])
    > 0 THEN Left([image], CharIndex('.jpg', [image]) - 1) ELSE [image] END as

    FileNoExt FROM [wws_logolocker] WHERE ([corpid] = @corpid AND [pk] = @pk)"
    UpdateCommand="UPDATE [wws_logolocker] SET [active] =
    @active, [descript] = @descript, [image] = @image, [sSVGImage] = @sSVGImage,
    [bAllDistUsers] = @bAllDistUsers WHERE [pk] = @original_pk AND [active] =
    @original_active AND [descript] = @original_descript AND [image] =
    @original_image AND [sSVGImage] = @original_sSVGImage AND [bAllDistUsers] =
    @original_bAllDistUsers"
    OldValuesParameterFormatString="original_{0}"
    >

    <DeleteParameters>
    <asp:parameter Name="original_pk" Type="Int32" />
    <asp:parameter Name="original_corpid" Type="Int32" />
    <asp:parameter Name="original_descript"
    Type="String" />
    <asp:parameter Name="original_active" Type="Boolean"
    />
    <asp:parameter Name="original_custpk" Type="Int32" />
    <asp:parameter Name="original_image" Type="String" />
    <asp:parameter Name="original_sSVGImage"
    Type="String" />
    <asp:parameter Name="original_bAllDistUsers"
    Type="Boolean" />
    <asp:parameter Name="original_LanguageID"
    Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
    <asp:parameter Name="corpid" Type="Int32" />
    <asp:parameter Name="descript" Type="String" />
    <asp:parameter Name="active" Type="Boolean" />
    <asp:parameter Name="custpk" Type="Int32" />
    <asp:parameter Name="image" Type="String" />
    <asp:parameter Name="sSVGImage" Type="String"
    ConvertEmptyStringToNull="false" />
    <asp:parameter Name="bAllDistUsers" Type="Boolean" />
    <asp:parameter Name="LanguageID" Type="Int32" />
    <asp:parameter Name="original_pk" Type="Int32" />
    <asp:parameter Name="original_corpid" Type="Int32" />
    <asp:parameter Name="original_descript"
    Type="String" ConvertEmptyStringToNull="false"/>
    <asp:parameter Name="original_active" Type="Boolean"
    />
    <asp:parameter Name="original_custpk" Type="Int32" />
    <asp:parameter Name="original_image" Type="String"
    ConvertEmptyStringToNull="false" />
    <asp:parameter Name="original_sSVGImage"
    Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
    <asp:parameter Name="original_bAllDistUsers"
    Type="Boolean" />
    <asp:parameter Name="original_LanguageID"
    Type="Int32" />

    </UpdateParameters>
    <InsertParameters>
    <asp:parameter Name="pk" Type="Int32" />
    <asp:parameter Name="corpid" Type="Int32" />
    <asp:parameter Name="descript" Type="String" />
    <asp:parameter Name="active" Type="Boolean" />
    <asp:parameter Name="custpk" Type="Int32" />
    <asp:parameter Name="image" Type="String" />
    <asp:parameter Name="sSVGImage" Type="String" />
    <asp:parameter Name="bAllDistUsers" Type="Boolean" />
    <asp:parameter Name="LanguageID" Type="Int32" />
    </InsertParameters>
    <SelectParameters>
    <asp:QueryStringParameter Name="corpid"
    QueryStringField="CorpID" Type="Int32" />
    <asp:ControlParameter ControlID="gvLogos"
    PropertyName="SelectedValue" Name="pk" Type="int32" />
    </SelectParameters>
    </asp:SqlDataSource>
    =?Utf-8?B?RWQ=?=, Apr 18, 2006
    #1
    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. Dan Stromberg

    sorting with expensive compares?

    Dan Stromberg, Dec 22, 2005, in forum: Python
    Replies:
    25
    Views:
    588
    Stuart D. Gathman
    Dec 28, 2005
  2. Randall Parker
    Replies:
    1
    Views:
    291
    Mike Meyer
    Jan 13, 2006
  3. Bas Nedermeijer

    Lots of string compares

    Bas Nedermeijer, Oct 23, 2006, in forum: C++
    Replies:
    8
    Views:
    301
    Yannick Tremblay
    Oct 25, 2006
  4. Replies:
    1
    Views:
    1,319
    Richard Senior
    Apr 24, 2007
  5. Replies:
    3
    Views:
    117
    askMe
    Jul 22, 2005
Loading...

Share This Page