Android Question Insert zip file in to a database

apty

Active Member
Licensed User
Longtime User
i am looking for a way of inserting a zip file in to mysql table. I am using the following code to get the zip file
B4X:
Dim InputStream1 As InputStream
    InputStream1 = File.OpenInput(File.DirDefaultExternal,"edit.zip")
    Dim OutputStream1 As OutputStream
    OutputStream1.InitializeToBytesArray(1000)
    File.Copy2(InputStream1, OutputStream1)
     'declares an empty array
     OutputStream1.ToBytesArray
    Buffer = OutputStream1.ToBytesArray
How can i insert the buffer to the table? if i try something like "update tba set zipfile=" Array As Object(Buffer) i get an error that the object is converted to string
 

apty

Active Member
Licensed User
Longtime User
Thank you very much Erel. What if i want to add a where condition after Array (buffer))? Please help
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…