Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > specified that delete command compares all values on SqlDataSource

Reply
Thread Tools

specified that delete command compares all values on SqlDataSource

 
 
=?Utf-8?B?RWQ=?=
Guest
Posts: n/a
 
      04-18-2006
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>
<asparameter Name="original_pk" Type="Int32" />
<asparameter Name="original_corpid" Type="Int32" />
<asparameter Name="original_descript"
Type="String" />
<asparameter Name="original_active" Type="Boolean"
/>
<asparameter Name="original_custpk" Type="Int32" />
<asparameter Name="original_image" Type="String" />
<asparameter Name="original_sSVGImage"
Type="String" />
<asparameter Name="original_bAllDistUsers"
Type="Boolean" />
<asparameter Name="original_LanguageID"
Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asparameter Name="corpid" Type="Int32" />
<asparameter Name="descript" Type="String" />
<asparameter Name="active" Type="Boolean" />
<asparameter Name="custpk" Type="Int32" />
<asparameter Name="image" Type="String" />
<asparameter Name="sSVGImage" Type="String"
ConvertEmptyStringToNull="false" />
<asparameter Name="bAllDistUsers" Type="Boolean" />
<asparameter Name="LanguageID" Type="Int32" />
<asparameter Name="original_pk" Type="Int32" />
<asparameter Name="original_corpid" Type="Int32" />
<asparameter Name="original_descript"
Type="String" ConvertEmptyStringToNull="false"/>
<asparameter Name="original_active" Type="Boolean"
/>
<asparameter Name="original_custpk" Type="Int32" />
<asparameter Name="original_image" Type="String"
ConvertEmptyStringToNull="false" />
<asparameter Name="original_sSVGImage"
Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
<asparameter Name="original_bAllDistUsers"
Type="Boolean" />
<asparameter Name="original_LanguageID"
Type="Int32" />

</UpdateParameters>
<InsertParameters>
<asparameter Name="pk" Type="Int32" />
<asparameter Name="corpid" Type="Int32" />
<asparameter Name="descript" Type="String" />
<asparameter Name="active" Type="Boolean" />
<asparameter Name="custpk" Type="Int32" />
<asparameter Name="image" Type="String" />
<asparameter Name="sSVGImage" Type="String" />
<asparameter Name="bAllDistUsers" Type="Boolean" />
<asparameter 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>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
STRUTS/JSTL: Need Match \ Equals tag that compares multiple values groovyjman21@gmail.com Java 1 04-24-2007 08:01 AM
Function that compares 2 alpha-numeric values? success_ny@yahoo.com Javascript 3 07-22-2005 10:10 AM
Bill Gates Compares Microsoft with GM Tech.News Computer Support 3 08-31-2004 02:03 PM
web sites that compares processors? CFR Computer Support 6 01-06-2004 01:54 AM
site that compares lag? Geoff Glave Digital Photography 0 12-04-2003 10:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57