Value from Sub Routine not being passed to parameter

Discussion in 'ASP.NET 2.0' started by gtjr92, May 9, 2005.

  1. I am trying to create a SUB in asp.net 2.0that will eventually update a fully editable grideview. However when i try this i get a no value for parameters error on this line dsoTithe.Update()


    Sub Updatedb(ByVal sender As Object, ByVal e As EventArgs)
    Dim dgi As GridViewRow
    For Each dgi In GridView1.Rows
    'Read in the Primary Key Field
    Dim id As Integer = (GridView1.DataKeys(dgi.RowIndex).Value.ToString())
    Dim Titheup As Double = CType(dgi.FindControl("TxtTithe"), TextBox).Text
    'Call UPDATE statement...
    dsoTithe.UpdateParameters.Clear()
    dsoTithe.Update()

    Next
    End Sub

    <asp:AccessDataSource ID="dsoTithe" runat="server" DataFile="~/App_Data/tithe/GBCTITHE.MDB"
    UpdateCommand="UPDATE Tithe SET Tithe=? Where trid=?">
    <updateparameters>
    <asp:controlparameter name="Titheparam" controlid="Updatedb" propertyname="Titheup"/>
    <asp:controlparameter name="TRIdparam" controlid="Updatedb" propertyname="id"/> </updateparameters>
    </asp:AccessDataSource>

     
  2. Is there a URL that we can see the error?
     
  3. no it'slocal, but if you are interested i can email you the files etc.
     

Share This Page