本文介绍了类型'string'的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在gridview_updating中编写代码时出现错误.

Hi,

I am getting error when i write the code in gridview_updating.

Error from : SQLADR.Update(cmbFrm.SelectedValue, cmbTo.SelectedValue) --> value of type ''string'' cannot be converted to ''system.data.dataset.


有什么错误.?
请参见下面的代码.


What is the Error.?
See below code.

Protected Sub grdDeptEmp_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles grdDeptEmp.RowUpdating
      ''To Fetch the data based on the Emp Number and update
      StrQry = "Select FromPeriod,ToPeriod from OtherDeptEmp"
      SQLADR = New SqlDataAdapter(StrQry, Conn)
      Dim cmbFrm As DropDownList = DirectCast(grdDeptEmp.Rows(e.RowIndex).FindControl("cmbFrm"), DropDownList)
      Dim cmbTo As DropDownList = DirectCast(grdDeptEmp.Rows(e.RowIndex).FindControl("cmbTo"), DropDownList)

      ''SQLADR.Update(cmbFrm.SelectedValue, cmbTo.SelectedValue, Convert.ToInt32(lblEmpNo.Text))
      SQLADR.Update(cmbFrm.SelectedValue, cmbTo.SelectedValue)
      grdDeptEmp.EditIndex = -1
      FillGrid()

  End Sub

推荐答案


这篇关于类型'string'的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 12:54