473,770 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

specified that delete command compares all values on SqlDataSource

Ed
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
OverwriteChange s.

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

<asp:SqlDataSou rce ID="sdsAddEdit " runat="server"
ConflictDetecti on="CompareAllV alues" ConnectionStrin g="<%$
ConnectionStrin gs:centiv_nexiv 2 %>"

OnUpdating="sds AddEdit_Updatin g"
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_activ e AND [descript] = @original_descr ipt AND [image] =
@original_image AND [sSVGImage] = @original_sSVGI mage AND [bAllDistUsers] =
@original_bAllD istUsers"
OldValuesParame terFormatString ="original_{ 0}"

<DeleteParamete rs>
<asp:Paramete r Name="original_ pk" Type="Int32" />
<asp:Paramete r Name="original_ corpid" Type="Int32" />
<asp:Paramete r Name="original_ descript"
Type="String" />
<asp:Paramete r Name="original_ active" Type="Boolean"
/>
<asp:Paramete r Name="original_ custpk" Type="Int32" />
<asp:Paramete r Name="original_ image" Type="String" />
<asp:Paramete r Name="original_ sSVGImage"
Type="String" />
<asp:Paramete r Name="original_ bAllDistUsers"
Type="Boolean" />
<asp:Paramete r Name="original_ LanguageID"
Type="Int32" />
</DeleteParameter s>
<UpdateParamete rs>
<asp:Paramete r Name="corpid" Type="Int32" />
<asp:Paramete r Name="descript" Type="String" />
<asp:Paramete r Name="active" Type="Boolean" />
<asp:Paramete r Name="custpk" Type="Int32" />
<asp:Paramete r Name="image" Type="String" />
<asp:Paramete r Name="sSVGImage " Type="String"
ConvertEmptyStr ingToNull="fals e" />
<asp:Paramete r Name="bAllDistU sers" Type="Boolean" />
<asp:Paramete r Name="LanguageI D" Type="Int32" />
<asp:Paramete r Name="original_ pk" Type="Int32" />
<asp:Paramete r Name="original_ corpid" Type="Int32" />
<asp:Paramete r Name="original_ descript"
Type="String" ConvertEmptyStr ingToNull="fals e"/>
<asp:Paramete r Name="original_ active" Type="Boolean"
/>
<asp:Paramete r Name="original_ custpk" Type="Int32" />
<asp:Paramete r Name="original_ image" Type="String"
ConvertEmptyStr ingToNull="fals e" />
<asp:Paramete r Name="original_ sSVGImage"
Type="String" DefaultValue="" ConvertEmptyStr ingToNull="fals e" />
<asp:Paramete r Name="original_ bAllDistUsers"
Type="Boolean" />
<asp:Paramete r Name="original_ LanguageID"
Type="Int32" />

</UpdateParameter s>
<InsertParamete rs>
<asp:Paramete r Name="pk" Type="Int32" />
<asp:Paramete r Name="corpid" Type="Int32" />
<asp:Paramete r Name="descript" Type="String" />
<asp:Paramete r Name="active" Type="Boolean" />
<asp:Paramete r Name="custpk" Type="Int32" />
<asp:Paramete r Name="image" Type="String" />
<asp:Paramete r Name="sSVGImage " Type="String" />
<asp:Paramete r Name="bAllDistU sers" Type="Boolean" />
<asp:Paramete r Name="LanguageI D" Type="Int32" />
</InsertParameter s>
<SelectParamete rs>
<asp:QueryStrin gParameter Name="corpid"
QueryStringFiel d="CorpID" Type="Int32" />
<asp:ControlPar ameter ControlID="gvLo gos"
PropertyName="S electedValue" Name="pk" Type="int32" />
</SelectParameter s>
</asp:SqlDataSour ce>


Apr 18 '06 #1
0 3335

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2494
by: Jesse Liberty | last post by:
I created a new database (tried both in 2005 and in SQL 2000) and then created a SqlDataSource control in an asp.net application. Clicked on the smart tag and whose configure data source. When I click Advanced should see the Generate Insert, Update and Delete statements check box but it is grayed out. Any idea what might cause this? I can work around with this code, which does work: SqlDataSource1.InsertCommand = "Insert into myTable...
0
4113
by: george | last post by:
Hi all - I am trying to use ASP.NET 2.0 to delete a row in an Oracle database table GC_LOG (see following, note that my connection string is fine, everything else like updateCommand is working) The ID and ACTION are varchar2(10) and varchar2(200) respectively: ------------------------- <asp:SqlDataSource ID="SqlDataSource5" runat="server"
4
2604
by: Wannabe | last post by:
I am using ASP.Net 2.0 and have a gridview on my page. I have everything working except the delete command. The page reloads except the row I am trying to delete is still there. I believe it is something really easy, but I cannot see it. The stored procedue works when run in QA. Can someone tell me what I am doing wrong/missing that is keeping the delete command from working in the gridview? Thank you. I am trying to delete a row out of...
0
1787
by: Wannabe | last post by:
I am using ASP.Net 2.0 and have a gridview on my page. I have everything working except the delete command. The page reloads except the row I am trying to delete is still there. I believe it is something really easy, but I cannot see it. The stored procedue works when run in QA. Can someone tell me what I am doing wrong/missing that is keeping the delete command from working in the gridview? Thank you. I am trying to delete a row out of...
0
5177
by: David Lozzi | last post by:
Howdy, ASP.Net 2.0 using VB on SQL 2005 This is a two fold issue. I have a DetailsView control which users can insert or edit items. Editing works great. Insert works great however I need to display the form once the user has entered the information and clicked Add.
0
1243
by: bdog4 | last post by:
I'm a bit new to asp.net and I'm trying to do very simple delete from a grid view but everytime I click on the delete link for the row it the page reloads and of course my row is still there. What am I missing here? <%@ Page Language="VB" MasterPageFile="~/XeroxScan.master" AutoEventWireup="false" CodeFile="Files.aspx.vb" Inherits="Files" title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">...
0
1534
by: gsauns | last post by:
I have a DetailsView which is inside of a FormView. I lifted this DetailsView straight off another one of my pages, where it was working beautifully. Now I get this endlessly frustrating error message whenever I try to go into Edit mode: Specified argument was out of the range of valid values. Parameter name: index The DetailsView is actually inside an UpdatePanel, which is inside an Ajax Accordion, which is inside the FormView. Could...
11
4079
by: Ed Dror | last post by:
Hi there, I'm using ASP.NET 2.0 and SQL Server 2005 with VS 2005 Pro. I have a Price page (my website require login) with GridView with the following columns PriceID, Amount, Approved, CrtdUser and Date And Edit and Delete buttons
2
2460
by: William LaMartin | last post by:
On webform, I am populating a GridView from a SQLDatasource based on a MySQL table named PIB. There is no vb code involved. Everything is done in the source for the aspx page, provided below. The update works fine, but a delete of a row produces the following error: Exception Details: System.Data.Odbc.OdbcException: ERROR SQLBindParameter not used for all parameters
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.