Hi,
I receive the error -
Incorrect syntax
Unclosed syntax near 's'
Unclosed quotation mark after character string ".
any help pleaseCode:query = "UPDATE dbo.TblPracExclude SET " & _ "prac_enabled = '" & DgvPracExcl.Rows(e.RowIndex).Cells(4).Value & "', " & _ "Notes = '" & Nz(Replace(DgvPracExcl.Rows(e.RowIndex).Cells(5).Value, " '", "''")) & "', " & _ "SysDatetime = '" & DateTime.Now.ToString("dd\-MMMM\-yyyy HH:mm:ss") & "', " & _ "WHERE prac_no = " & _ DgvPracExcl.Rows(e.RowIndex).Cells(0).Value & ""
cmd = New SqlCommand(query, conn)
cmd.ExecuteNonQuery()




Reply With Quote