Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Read Write BLOB Binary MySQL Collect Stream Open Write Read BinaryAllocArray
The BLOB is in the binary buffer FaceTemplate.
RS5.AddNew() RS5.Collect("idImage") = idImage RS5.Collect("FaceNumber") = 1 RS5.Collect("FaceTemplate") = ?????? RS5.Update()
The Read:
AStream.Open() AStream.Write( myREC.Collect("blobject") ) AStream.Position=0 ssize = AStream.Size btxt = AStream.Read(-1) bb = BinaryAllocArray(btxt) bbh = IntControl(42,bb,0,0,0) AStream.close()
The Write:
fs=Filesize(sfile) ;binary data is converted to HEX for inserts binbuf = BinaryAlloc(fs+1000) BinaryRead(binbuf, sfile) stxt=BinaryPeekHex( binbuf, 0, BinaryEodGet(binbuf)) BinaryFree(binbuf) SQLText = "update images set blobject = X'":stxt:"' where isbn = '":isbn:"';"Reference: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/ADO~DAO+ADO~Stream~to~Binary~Buffer.txt
Hope this helps.
Article ID: W18043
Filename: Write BLOB to MySQL.txt
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38