I'm having great difficulty in getting the syntax correct to write a camera picture Byte array to an SQLite blob field. I want to write a new row together with other vars at the same time. The Data() byte array is the one passed when the sub is called.
Some of the code samples in the forum are a little misleading when it comes to writing a mixed row of vars embedded in SQL and I am continually getting syntax failures on compile. I am misunderstanding something around the Array As Object syntax but I can't see what !
TABLE People
-RecNum INT PK
-First TEXT
-Last TEXT
-NickName TEXT
-Picture BLOB
Can this be executed just with a simple SQL.ExecQuery ? An example with both would be appreciated.
Thanks
Some of the code samples in the forum are a little misleading when it comes to writing a mixed row of vars embedded in SQL and I am continually getting syntax failures on compile. I am misunderstanding something around the Array As Object syntax but I can't see what !
TABLE People
-RecNum INT PK
-First TEXT
-Last TEXT
-NickName TEXT
-Picture BLOB
B4X:
Sub Camera1_PictureTaken (Data() As Byte)
camera1.StartPreview
SQL1.ExecNonQuery2("INSERT INTO People VALUES _ ('First','Last','NickName','Picture')",_
("Joseph", "Bloggs", "Joe", Array As Object (Data)))
btnTakePicture.Enabled = True
End Sub
Can this be executed just with a simple SQL.ExecQuery ? An example with both would be appreciated.
Thanks