Hello,
I want to insert in my table an image
I have added in the DB field.
How should the following code (
ExecNonQuery)
when I image (BLOB)
would like to insert as the last field to save?
Have been very much sought, but found no example with multiple fields.
I want to insert in my table an image
I have added in the DB field.
How should the following code (
ExecNonQuery)
when I image (BLOB)
would like to insert as the last field to save?
Have been very much sought, but found no example with multiple fields.
B4X:
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirDefaultExternal, "temp_klein.jpg")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
If M_Artikel_aendern = False Then 'Wenn Neuanlage gewählt wurde
angehakt = 0 'Artikel nicht zur auswahl angehakt setzen
SQLartikel.ExecNonQuery("INSERT INTO Artikel (datumticks,datum,name,kat,eht,preis,notiz,angehakt) values("&DateTime.Now&",'"&LBL05dat_Datum.Text&"','"&EDT05Name.Text&"','"&EDT05Kategorie.Text&"','"&EDT05Menge_EHT.Text&"','"&EDT05Preis.Text&"','"&EDT05Notiz.Text&"','"&angehakt&"')")