0

我正在尝试更新从数据集适配器带回的行。我显然做错了什么,但我的谷歌搜索/逻辑一直让我失望。

这就是我所拥有的;

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

数据库字段称为状态,我想把 Canceled 的字符串放在那里

4

0 回答 0