473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

updating formview

I have a formview which has exactly the same parameters as a
detailsview, but I get an error when I try to update when editing the
formview. Here are my update parameters :
<UpdateParameters>
<asp:Parameter Name="ProductTypeID"
Type="Int32" />
<asp:Parameter Name="OpportunityTypeID"
Type="Int32" />
<asp:Parameter Name="MonetaryValue"
Type="Double" />
<asp:Parameter Name="ProbabilityID"
Type="Int32" />
<asp:Parameter Name="Location" Type="String"
/>
<asp:Parameter Name="OpportunityStatusID"
Type="Int32" />
<asp:Parameter Name="Description"
Type="String" />
<asp:Parameter Name="OpportunityID"
Type="Int32" />
</UpdateParameters>

And the EditItemTemplate :

<EditItemTemplate>
<table width="500">
<tr>
<td width="100px" align="right">
<asp:label
id="lblOpportunityID3" Runat="server" SkinID="Main">Opportunity ID
:</asp:label>
</td>
<td width="100px">
<asp:Label
ID="lblOpportunityID4" runat="server" Text='<%# Bind("OpportunityID")
%>'></asp:Label>
</td>
<td width="100px" align="right">
<asp:label id="lblProductType3"
Runat="server" SkinID="Main">Product Type :</asp:label>
</td>
<td width="100px">
<asp:DropDownList
ID="ddlProductType" runat="server" DataSourceID="SqlDataSource2"
DataTextField="ProductType"
DataValueField="ProductTypeID"
SelectedValue='<%#
Bind("ProductTypeID") %>'></asp:DropDownList>
</td>
</tr>
<tr>
<td width="100px" align="right">
<asp:label
id="lblOpportunityType3" Runat="server" SkinID="Main">Opportunity Type
:</asp:label>
</td>
<td width="100px">
<asp:DropDownList
id="ddlOpportunityType" DataSourceID="SqlDataSource3" Runat="Server"
DataTextField="OpportunityType"
DataValueField="OpportunityTypeID" SelectedValue='<%#
Bind("OpportunityTypeID") %>'/>
</td>
<td width="100px" align="right">
<asp:label id="lblValue3"
Runat="server" SkinID="Main">Value (£) :</asp:label>
</td>
<td width="100px">
<asp:TextBox ID="txtValue"
Text='<%# Bind("MonetaryValue") %>' runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtValue"
Display="None" ErrorMessage="Please enter a Value" />
<asp:RangeValidator
ID="RangeValidator1" runat="server"
ControlToValidate="txtValue"
Type="Double" MaximumValue="4000000"
MinimumValue="0" Display="None"
ErrorMessage="Value must be numeric" />
</td>
</tr>
<tr>
<td width="100px" align="right">
<asp:label id="lblProbability3"
Runat="server" SkinID="Main">Probability (%) :</asp:label>
</td>
<td width="100px">
<asp:DropDownList
id="ddlProbability" DataSourceID="SqlDataSource4" Runat="Server"
DataTextField="Probability"
DataValueField="ProbabilityID" SelectedValue='<%# Bind("ProbabilityID")
%>'/>
</td>
<td width="100px" align="right">
<asp:label id="lblLocation3"
Runat="server" SkinID="Main">Location :</asp:label>
</td>
<td width="100px">
<asp:TextBox ID="txtLocation"
Text='<%# Bind("Location") %>' runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtLocation"
Display="None" ErrorMessage="Please enter a Location" />
</td>
</tr>
<tr>
<td width="100px" align="right">
<asp:label id="lblCompanyName3"
Runat="server" SkinID="Main">Company Name :</asp:label>
</td>
<td width="100px">
<asp:Label ID="lblCompanyName"
runat="server" Text='<%# Bind("CompanyName") %>'></asp:Label>
</td>
<td width="100px" align="right">
<asp:label id="lblDateCreated3"
Runat="server" SkinID="Main">Date Created :</asp:label>
</td>
<td width="100px">
<asp:Label ID="lblDateCreated"
runat="server" Text='<%# Bind("DateCreated") %>'></asp:Label>
</td>
</tr>
<tr>
<td width="100px" align="right">
<asp:label id="lblStatus3"
Runat="server" SkinID="Main">Status :</asp:label>
</td>
<td width="100px">
<asp:DropDownList
id="ddlOpportunityStatus" DataSourceID="SqlDataSource5" Runat="Server"

DataTextField="OpportunityStatus" DataValueField="OpportunityStatusID"
SelectedValue='<%# Bind("OpportunityStatusID") %>'/>
</td>
<td width="100px" align="right">
<asp:label
id="lblDateWonOrLost3" Runat="server" SkinID="Main">Date Won Or Lost
:</asp:label>
</td>
<td width="100px">
<asp:Label ID="lblDateWonOrLost"
runat="server" Text='<%# Bind("DateWonOrLost") %>'></asp:Label>
</td>
</tr>
<tr>
<td width="100px" align="right"
valign="top">
<asp:label id="lblDescription3"
Runat="server" SkinID="Main">Description :</asp:label>
</td>
<td colspan="3">
<asp:TextBox ID="txtDescription"
Text='<%# Bind("Description") %>' runat="server"
TextMode="MultiLine" Rows="10"
Columns="50"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"

ControlToValidate="txtDescription" Display="None" ErrorMessage="Please
enter a Description" />
</td>
</tr>
<tr>
<td>
<asp:ImageButton ID="btnUpdate"
runat="server" ImageUrl="~/Images/btnUpdate.jpg" CommandName="Update" />
<asp:ImageButton ID="btnCancel"
runat="server" ImageUrl="~/Images/btnCancel.jpg" CommandName="Cancel" />
</td>
</tr>
</table>
</EditItemTemplate>

The error I get is :

'Procedure or function UpdateOpportunity2 has too many arguments
specified'

Yet this is exactly the same sproc as I am using in a DetailView with
the same parameters which works fine.

Does anybody know why this is happening?
Regards,

Mike
*** Sent via Developersdex http://www.developersdex.com ***
May 2 '06 #1
0 1180

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

Similar topics

22
by: Mal Ball | last post by:
I hope I have the right forum for this question. I have an existing Windows application which uses a SQL Server database and stored procedures. I am now developing a web application to use the same...
1
by: MasterChief | last post by:
I have a FormView that won't update at all. I have looked at thing such as datakeys and making sure the update command is correct but I can't find the problem. Here is my code. Could the item_id...
1
by: Dabbler | last post by:
I have a FormView tied to ObjectDataSource that's not updating and am wondering what I missed.. <asp:FormView ID="fvRegDetail" runat="server" DefaultMode="Edit" DataKeyNames="RegistrantId"...
2
by: sck10 | last post by:
Hello, I have a SQL Server 2K table with a field set to currency. When I try to insert or update a FormView, I get the following error: Disallowed implicit conversion from data type nvarchar...
0
by: Larry R | last post by:
ASP.Net 2, Formview. I have a ObjectDataSource that is bound to a custom BusinessObject. On the formview, I have some dropdownlists and checkboxlist that are bound to a database for their values....
1
by: Dave E | last post by:
Hi all, == brief version == using ASP 2.0, I have a ddl inside a formview. On update, if the ddl starts as NULL, no update happens. If the ddl has a bound value that is not NULL, then all...
3
by: Trez | last post by:
Hey guys, Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me? Incorrect syntax near 'nvarchar'. Description: An unhandled...
2
by: YouPoP | last post by:
Hi, I am doing an MFC MDI application with VS 8.0. I am using the default document view plus a formview ans show both of them in the view using a splitter. In the formview there is an event...
0
by: John Mason | last post by:
Hi, I've been trying for most of the day to get a FormView control to work. I would like to display a single record, based on a unique user id (loginid), which I am retreiving from a cookie. No...
1
by: Bresco | last post by:
I'm using ObjectDatasource in combination with a Formview. The ObjectDatasource is connected to a FormView. I have a business object property which I can't update through the normal binding...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.