I am using vb.net 2005 and an SQL Server database
i have 2 tables, I want to update a field in the first table if 2 fields in the second table are as specified.
I have tried the following code but it returns an error
"Incorrect syntax near the keyword INNER"
Any help would be greatly appreciated,
Dim comm As New SqlCommand("UPDATE Appointments INNER JOIN " & _
"PatientDet ON Appointments.patientNIN = PatientDet.NIN " & _
"SET Appointments.checkedIn = True " & _
"WHERE PatientDet.NIN = '" & txtNin.Text.ToString.Trim & "'" & _
"AND PatientDet.lastName = '" & txtSurname.Text.ToString.Trim & "'", dbHandling.getDbConn)
Catch ex As Exception