Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
Private Sub SaveButton_Click(sender As System.Object, e As System.EventArgs) Handles SaveButton.Click If myConnection.State = ConnectionState.Closed Then myConnection.Open() End If Dim str As String str = "Update [Items] SET [Picked] = '" & escapeQutoes(Controls("Picked").Text) & "', [Datepicked] = '" & escapeQutoes(Controls("Datepicked").Text) & "', [Tech] = '" & escapeQutoes(Controls("Tech").Text) & "' WHERE [RITMWO] = '" & escapeQutoes(Controls("RITMWO").Text) & "'" Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection) Dim targetFilename As String = "C:\Users\Dudeman\Desktop\Sigs\'" & RITMWO.Text & "'.jpg" Signature.Ink.Save(targetFilename) Try cmd.ExecuteNonQuery() cmd.Dispose() myConnection.Close() MsgBox("Records Updated Successfully") Catch ex As Exception MsgBox(ex.Message) End Try End Sub Public Function escapeQutoes(input As String) As String If input.Contains("'") Then input = input.Replace("'", "''") End If Return input End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.