*Simple program to read image file into memo field. *Please excuse the 5 minute got to get the image into a table code ******************************************* *Table to store image: IMAGE * Fields: * Name C(25) Image file name * Image M Memo field to hold image ******************************************* use image m.name=getfile('GIF','Select Image File') if empty(m.name) return endif fh=fopen(m.name) if fh<0 wait window 'Error opening source file' use return endif m.image='' do while !feof(fh) wrk=fread(fh,8000) m.image=m.image+wrk enddo =fclose(fh) wrk1=alltrim(m.name) sz=len(wrk1) ck=rat('\',wrk1) If ck>0 wrk1=right(wrk1,sz-ck) &&Get just the file name, drop the path endif m.name=wrk1 insert into image from memvar use *Now read the memo field and output to image file(s). OUTDIR='C:\yourpath\' USE IMAGE SCAN fname=ALLTRIM(NAME) IF FILE(OUTDIR+fname) DELETE FILE (OUTDIR+fname) ENDIF fh = FCREATE(OUTDIR+fname) IF fh < 0 && Check for error creating file WAIT 'Cannot create output file'+fname WINDOW LOOP ENDIF ims=IMAGE.IMAGE FWRITE(fh,ims) =FCLOSE(fh) ENDSCAN USE