BLOB photo
SELECTBLOB pic INTO :photo FROM pictures;
Long a,times,j,fori,len30
len30=32765
a=Len(photo)
times=Int( a / len)
IF a<>(times * len) THEN times=times + 1
j=FileOpen(ws_filename,StreamMode!, Write!, LockWrite!, Replace!)
FOR fori = 1 TO times
if fori = times Then
photo1 = BlobMid(photo,(fori - 1 ) * len + 1)
else
photo1 = BlobMid(photo,(fori - 1 ) * len + 1,(fori * len))
end if
filewrite(j,photo1)
NEXT
fileclose (j)
MessageBox(String(len(photo)),filelength(ws_filename))
j_count = ole_pictures.InsertFile(ws_filename)
j_count = ole_pictures.Activate(InPlace! )
EnD IF