1 Replies - 700 Views - Last Post: 02 August 2011 - 10:37 AM Rate Topic: -----

#1 nicesmile  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 07-July 11

problem updating table from DropDownList nested in GridView

Posted 02 August 2011 - 02:38 AM

I followed these steps in order to have a dropdownlist nested in a gridview, the display works just fine, but the update doesn't

here is the steps i followed, but as i have to join some tables i had to use a specific select statement which lead to the use of a specific update statement and none of the trials i did were working (http://msdn.microsoft.com/en-us/library/ms178294.aspx)

Here is the code for the sqldatasource in the .aspx page
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:masterConnectionString %>" 
        
        SelectCommand="select v.ven_matricule, v.ven_nom, v.ven_prenom, fd.fd_attendance, f.ag_matricule from vendeur v join f_details fd on v.ven_matricule = fd.fd_ven_matricule join formation f on f.f_num = fd.f_num where f.f_type='Vendeur(se)'" 
        
        
        UpdateCommand="UPDATE f_details SET fd_attendance = 'DropDownList2.SelectedValue.ToString' WHERE (fd_ven_matricule = @fd_ven_matricule)">
        <UpdateParameters>
            <asp:Parameter Name="fd_ven_matricule" />
        </UpdateParameters>
    </asp:SqlDataSource>



Is This A Good Question/Topic? 0
  • +

Replies To: problem updating table from DropDownList nested in GridView

#2 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: problem updating table from DropDownList nested in GridView

Posted 02 August 2011 - 10:37 AM

getting errors?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1