Android Question Repl image from MySql

dibesw

Active Member
Licensed User
Longtime User
I want to replace an image from a mysql table.
I use this code but in this case not works because datax is not string format.
I think to use PostBytes but do not know how.
who can help me?
Thanks
B4X:
Sub repl_immagine5e
    Dim datax() As Byte
    Dim Qry As String
    Dim ServerUrl As String   
    dbI.Initialize("",Me)
    ServerUrl ="http://www.ppp.ppp.it/sirio/ssconnectdbxandroid.php"
    datax=dbI.ImageToBytes(LoadBitmap(File.DirRootExternal, "appo.jpg"))
    Qry="update t02dipendenti set t02dipendentifoto=" & datax & " where t02dipendentimatricola=" & Main.mautente
    jobx.Initialize("Job1", Me)
    jobx.PostString(ServerUrl, Qry)
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…