I've done this a million times, but I keep getting the error: Data type mismatch in criteria expression from the following code.
valCancel = DateTime.Now() & "-" & TracktionUser
strCancel = "Update CWE_Debug Set Cancel=@Cancel Where UserCode = '" & valUser & "' And ExamID = '" & valExam & "'"
cmdCancel = New OleDbCommand( strCancel, conTracktion )
cmdCancel.Parameters.Add( "@ExamID", OleDBType.Char).Value = valCancel
valCancel is defined as a string and the Cancel field in my Access DB is ShortText. I've tried to update other fields in the table and got the same error. So I thought my DB got corrupted and I run repair. Is there a line of code to ask what oledbtype its looking for? I'm completely stumped on this one. Anybody have any ideas?