I'm creating a series of apps for my work to inventory orders, loaners, etc. and I've gotten most everything created. The problem I'm having is with signatures. The user will need to sign for whatever they're getting. To achieve this, I'm using an Inkpicture object. It works great, except when I use the save method, I get InvalidCast Exception.
Here is the code I'm using to save:
Private Sub SaveButton_Click(sender As System.Object, e As System.EventArgs) Handles SaveButton.Click
If myConnection.State = ConnectionState.Closed Then
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"
MsgBox("Records Updated Successfully")
Catch ex As Exception
Public Function escapeQutoes(input As String) As String
If input.Contains("'") Then
input = input.Replace("'", "''")
I haven't been able to find anything useful in my two weeks of searching for the answer. Can anyone help me? I've tried changing the file type to .gif, bmp, and .isf with no change.
Ultimately, I'm looking to save this into the Access database it's pulling and saving to anyway (for the other information being saved), but I'm trying to get the signature saved any way I can.