[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

formview updateitem not updating !?

Posted on 2011-09-12
4
Medium Priority
?
1,041 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 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