?
Solved

formview updateitem not updating !?

Posted on 2011-09-12
4
Medium Priority
?
1,066 Views
Last Modified: 2012-05-12
i tried to do a manual update for a formview in asp.net application , the Sqldatasource that are connected to the Formview is :

  <asp:SqlDataSource ID="OnlineApp" runat="server" ConnectionString="<%$ ConnectionStrings:OnlineAppConnectionString %>"
                        InsertCommand="INSERT INTO [APP_A] ([AppId], [AppSubmitDate], [AppElectSubmit], [AppFaxSubmit], [AppNormalSubmit], [AppPersonalSubmit]) VALUES (@AppId, @AppSubmitDate, @AppElectSubmit, @AppFaxSubmit, @AppNormalSubmit, @AppPersonalSubmit)"
                        SelectCommand="SELECT * FROM [APP_A]"
                        UpdateCommand="UPDATE [APP_A] SET [AppSubmitDate] = @AppSubmitDate, [AppElectSubmit] = @AppElectSubmit, [AppFaxSubmit] = @AppFaxSubmit, [AppNormalSubmit] = @AppNormalSubmit, [AppPersonalSubmit] = @AppPersonalSubmit WHERE [AppId] = @AppId"
                        DeleteCommand="DELETE FROM [APP_A] WHERE [AppId] = @AppId">
                       
                       
                        <DeleteParameters>
                            <asp:Parameter Name="AppId" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:SessionParameter Name="AppId" SessionField="AppId" />
                            <asp:Parameter DbType="Date" Name="AppSubmitDate" />
                            <asp:Parameter Name="AppElectSubmit" Type="Boolean" />
                            <asp:Parameter Name="AppFaxSubmit" Type="Boolean" />
                            <asp:Parameter Name="AppNormalSubmit" Type="Boolean" />
                            <asp:Parameter Name="AppPersonalSubmit" Type="Boolean" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter DbType="Date" Name="AppSubmitDate" />
                            <asp:Parameter Name="AppElectSubmit" Type="Boolean" />
                            <asp:Parameter Name="AppFaxSubmit" Type="Boolean" />
                            <asp:Parameter Name="AppNormalSubmit" Type="Boolean" />
                            <asp:Parameter Name="AppPersonalSubmit" Type="Boolean" />
                            <asp:SessionParameter Name="AppId" SessionField="AppId" />
                        </UpdateParameters>
                    </asp:SqlDataSource>


the part the i use to do the update is:

  Select Case FormView2.CurrentMode
                    Case FormViewMode.Insert
                        FormView2.InsertItem(True)

                    Case FormViewMode.Edit
                        FormView2.UpdateItem(True)
                End Select


the insertitem work fine, but the update do nothing

any advice ?
0
Comment
Question by:nasemabdullaa
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36522458
Use profiler to check what update command is firing at back end. Profiler will show you sql command. Check this update statement.
0
 

Author Comment

by:nasemabdullaa
ID: 36523958
can you give me more details about Profiler ? a download link ? is it open source ?
0
 
LVL 17

Accepted Solution

by:
sonawanekiran earned 1500 total points
ID: 36527238
It is not a open source. It's sql server tool to monitor queries firing at back end.

http://www.petri.co.il/monitoring-with-sql-profiler.htm

Search with SQL profiler
0
 

Author Closing Comment

by:nasemabdullaa
ID: 36711663
is working now
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question