Hi All,
I have written the following code to insert a record, works well a shown on this site and in my App.
However I wish to use the UPDATE command with WHERE, any tips please. Also an example of reading the blob back to an imageviewer would be of great assistance.
Regards to Erl and All
I have written the following code to insert a record, works well a shown on this site and in my App.
B4X:
'Convert Image View to Byte Buffer
Dim MyBuffer1() As Byte 'declares an empty array
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(10000)
s_image1.GetImage.WriteToStream(OutputStream1)
MyBuffer1 = OutputStream1.ToBytesArray
OutputStream1.Close
' Set Record to update
'Dim MySearch As String
'MySearch = s_sellcode.Text
'Create Query Statement
Dim strSQL As String = "INSERT INTO qualas_stock SET s_sellcode = '" & s_sellcode.Text & "', s_shortdescription = 'AAA', s_longdescription = 'bbb', s_type = 'ccc', s_sunit = '1', s_unitdescription = 'eee', s_image1 = ?;"
sql1.ExecNonQuery2(strSQL, Array As Object(MyBuffer1))
However I wish to use the UPDATE command with WHERE, any tips please. Also an example of reading the blob back to an imageviewer would be of great assistance.
Regards to Erl and All