我正在尝试更新从数据集适配器返回的行。我显然做错了什么,但我的谷歌/逻辑一直让我失望。
继承我拥有的东西;
Public Class Popup
Inherits System.Web.UI.Page
Private dtJobs As Barry.joblistDataTable
Private taJobs As New BarryTableAdapters.joblistTableAdapter
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Type As String = Request.QueryString("t")
Select Case Type
Case "cancel"
CancelLocation(Request.QueryString("t"))
End Select
End Sub
Protected Sub CancelLocation(ByVal JobNo As String)
dtJobs = New Barry.joblistDataTable
dtJobs = taJobs.GetByJobNo(JobNo)
dtJobs.Item("Status") = "Cancelled"
taJobs.Update(dtJobs)
End Sub
End Class
数据库字段名为Status,我想将Canceled字符串放在那里