Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 To: Paul Gibson
  Where is Paul Gibson?
 Glasgow
 United Kingdom
 Paul Gibson
 Tags
Subject: RE: pictures in reports
Thread ID: 395764 Message ID: 395872 # Views: 38 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Monday, January 20, 2014 10:21:27 PM         
   


> >
> > I agree with all of you that it is better to store the images outside the database but in my case, some of the image files are no longer available and I have to rely on the ones stored in the memo fields. Before I can get the image files back, I may have to use your method of extracting the images from the memo fields. Which command or fuction can i use to extract an image from a memo field.
> >
>
> Well that depends how they were put there in the first place. It may be that the information has been put into the memo fields with a simple FILETOSTR() function, if so then the reverse function call STRTOFILE() will allow you to recreate the files. You specifically note that they are memo (binary) fields and I must admit that I do not have a huge amount of experience of dealing with memo (binary) fields simply because I've avoided using them for the purpose you are.
>
> Try STRTOFILE(), hope that works for you.
>
> EDIT: Or Tore's solution would also work. I get exactly the same result with StrToFile and COPY MEMO



Paul, I also just tested Tore's method - saving with FILETOSTR() but retrieving with COPY MEMO memoname TO (pathfilename) works as well just fine. Either memo or memo-binary works ok for .jpg

Regards,
David

ENTIRE THREAD

pictures in reports Posted by bennet eze @ 1/18/2014 4:45:09 PM
RE: pictures in reports Posted by Pete Sass @ 1/18/2014 6:02:41 PM
RE: pictures in reports Posted by bennet eze @ 1/18/2014 9:40:29 PM
RE: pictures in reports Posted by Pete Sass @ 1/18/2014 11:21:57 PM
RE: pictures in reports Posted by Jun Tangunan @ 1/19/2014 1:31:28 AM
RE: pictures in reports Posted by David Mustakim @ 1/19/2014 4:11:23 AM
RE: pictures in reports Posted by Paul Gibson @ 1/20/2014 10:50:11 AM
RE: pictures in reports Posted by bennet eze @ 1/20/2014 9:10:18 PM
RE: pictures in reports Posted by Tore Bleken @ 1/20/2014 9:52:36 PM
RE: pictures in reports Posted by Paul Gibson @ 1/20/2014 10:16:57 PM
RE: pictures in reports Posted by David Mustakim @ 1/20/2014 10:21:27 PM
RE: pictures in reports Posted by Paul Gibson @ 1/20/2014 10:27:16 PM
RE: pictures in reports Posted by David Mustakim @ 1/20/2014 10:36:56 PM
RE: pictures in reports Posted by Paul Gibson @ 1/20/2014 10:46:06 PM
RE: pictures in reports Posted by bennet eze @ 1/21/2014 12:58:56 AM
RE: pictures in reports Posted by Vilhelm-Ion Praisach @ 1/21/2014 6:21:14 AM
RE: pictures in reports Posted by David Mustakim @ 1/21/2014 8:25:06 AM
RE: pictures in reports Posted by Paul Gibson @ 1/20/2014 10:43:46 PM
RE: pictures in reports Posted by bennet eze @ 1/21/2014 7:56:17 AM
RE: pictures in reports Posted by Tore Bleken @ 1/21/2014 9:59:45 AM
RE: pictures in reports Posted by bennet eze @ 1/21/2014 3:11:14 PM
RE: pictures in reports Posted by Tore Bleken @ 1/21/2014 3:21:07 PM
RE: pictures in reports Posted by Vilhelm-Ion Praisach @ 1/20/2014 10:24:51 PM
RE: pictures in reports Posted by tom knauf @ 1/21/2014 5:04:36 PM