PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Import Image from Mysql with SQLConnectWS - v21 Mobile
Import Image from Mysql with SQLConnectWS - v21 Mobile
Débuté par Victor Hugo Pereyra, 05 jan. 2018 14:48 - Aucune réponse
Posté le 05 janvier 2018 - 14:48
Good morning.
I need help or maybe someone has already solved it.
I have tried, I believe, several alternatives and without success. I have a
Mobile application in v21, from the MYSQL server side, from the Mobile HF,
using the SQLConnectWS connection. It is a system of Orders, from the mobile
I need to synchronize Articles or items of merchandise with its description,
price and image of the product. When I execute the query and start to
update, all the fields of description, price, work perfectly, but as regards
the image, it does not work correctly, since there are images that update
well and others do not (directly do nothing ), since the windows emulator
works correctly.
I pass a piece of code as I am doing (as I said before, I made other forms
but it does not work either).

Someone has surely done this type of process, in which case you could tell
me where I am wrong?
Code

SQLFirst("QRY1")
WHILE NOT SQL.Out
sCodigo =SQLGetCol("QRY1",2)

IF HExtractMemo(SQLGetMemo("QRY1", 1),sDIRECT+ "Producto.jpg") = False
THEN
Error("NO SE PUEDE GRABAR EL JPG"+CR+ErrorInfo(errFullDetails))
END

IF HReadSeek(Articulo,Codigo, sCodigo) = True
IF HFound()
HLinkMemo(Articulo, Imagen, sDIRECT+ "Producto.jpg", hMemoImg)
//Articulo.Imagen = fLoadBuffer(sDIRECT+ "Producto.jpg")
IF HModify(Articulo) = False THEN
Info("Error vhp")
Error(ErrorInfo(errFullDetails)+CR+"ARTICULOS")
bCORRECTO = False
END
END
END



IMG_ImagenArticulo=sDIRECT+ "Producto.jpg"
IF fDelete(sDIRECT+ "Producto.jpg") = True THEN
Info("fue borrado la imagen")
END



SQLNext("QRY1")
END


---
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus