I have the following code:
Shared Sub ExecSQL(ByVal connection As SQLiteConnection, ByVal commandText As String, Optional ByVal param As Object = Nothing)
If connection Is Nothing Then
Throw New NullReferenceException("Connection required!")
End If
If connection.State <> ConnectionState.Open Then
connection.Open()
End If
connection.Execute(commandText, param)
End Sub
Shared Sub SaveFingerPrints(p As Person)
For Each f In p.Fingerprints
ExecSQL($"insert into Prints(id,finger,image,template) values({p.Id},{f.Finger},{f.AsImageData},{f.Template});")
Next
End Sub
I end up with the following insert statement:
insert into Prints(id,finger,image,template) values(1,RightThumb,System.Byte[],System.Byte[]);
Please how can I fix this