No value given for one or more required parameters.
แก้ไขยังไงดีครับ ?
Code (VB.NET)
Private Sub sevre_Click(sender As Object, e As EventArgs) Handles btnServe.Click
If Not conn.State = ConnectionState.Open Then
conn.Open()
End If
Dim cmd As New OleDbCommand
Dim i As Integer
For i = 0 To Kitdata.Rows.Count - 1
If Kitdata.Rows(i).Cells(0).Value IsNot Nothing Then
Dim id As [String] = Kitdata.Rows(i).Cells(1).Value.ToString
Dim sql As String = "UPDATE [order] set [Status] = 'sav' where [Select] = '" & id & "'"
cmd.Connection = conn
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.ExecuteNonQuery()
End If
Next
getdata()
conn.Close()
End Sub
Tag : .NET, Ms Access, Win (Windows App), VB.NET, VS 2012 (.NET 4.x)