View Single Post
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: Update Command in Vb.net

 
0
  #2
Oct 12th, 2008
Enclose text field values in quotes:
  1. Dim strSQL As String = ("UPDATE Staff SET StaffName = ['" & _
  2. namebox.Text & "'] ,Address = ['" & addbox.Text & _
  3. "'] ,Phone = ['" & phone & "'] ,JobPosition = ['" & _
  4. posbox.Text & "'] ,JobStat = ['" & genId & _
  5. "'] WHERE SID='" & id.Text & "'")
If SID field is numeric, remove quotes from it.
Reply With Quote