Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   specified that delete command compares all values on SqlDataSource (http://www.velocityreviews.com/forums/t152467-specified-that-delete-command-compares-all-values-on-sqldatasource.html)

=?Utf-8?B?RWQ=?= 04-18-2006 08:52 PM

specified that delete command compares all values on SqlDataSource
 
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>






All times are GMT. The time now is 09:45 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.