Hi ... i tryin to update my SQL using this method but it didn't update...Anyone have a better way to do this ?
------------------------------------------------------------
------------------------------------------------------------
Code:
Case "OUT"
Dim connectionstring As String = "Server=PENW3GFSB2S\SQLEXPRESS;Database=People;Trusted_Connection = yes"
Dim query As String = "Update [Names] Set [TimeOut]= '" & lblTimeNow.Text & "'where [BatchNo] ='" & Label1.Text & " ' "
Dim conn As New SqlConnection(connectionstring)
Dim cmd As New SqlCommand(query, conn)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
MessageBox.Show("THX !!!")
txtBadgeNumber.Text = ""
Case Else
Return False
End Select
End Function
Comment