Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Craig Boyd
  Where is Craig Boyd?
 Forest Lake
 Minnesota - United States
 Craig Boyd
 To: bryan wetton
  Where is bryan wetton?
 Morphett Vale
 Australia
 bryan wetton
 Tags
Subject: RE: Replace difficulty
Thread ID: 207195 Message ID: 207206 # Views: 40 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Friday, December 12, 2008 6:04:47 AM         
   


> I have created a cursor/table with a decode of the 4char 'header' of the image files stored in a general field of the master table.
>
> LEFT(Image,4) As ImageType, ;
>
> As an example ÿØÿà is stored when the image file is a jpg.
>
> I want to scan through the new table and replace the ÿØÿà with jpg where it occurs and 'jpg' is stored in myfile.
>
> My code
>
> replace mycsv.ImageType WITH myfile
>
> has no effect.
>
> Any ideas anyone?
>
> -Bryan


Replace mycsv.imagetype with myfile in "mytable"

...or...

Replace All mycsv.imagetype with myfile in "mytable"

...or...

Replace mycsv.imagetype with myfile for atc("ÿØÿà", mycsv.imagetype) > 0 in "mytable"


Given that you are showing "Left(image,4) as ImageType" is it possible that mycsv is a cursor you created? If so, ensure that you added READWRITE at the end of your query otherwise the cursor will be readonly.

Craig Boyd
www.sweetpotatosoftware.com



COMPLETE THREAD
Replace difficulty Posted by bryan wetton @ 12/12/2008 4:10:52 AM
RE: Replace difficulty Posted by tushar @ 12/12/2008 6:03:42 AM
RE: Replace difficulty Posted by Craig Boyd @ 12/12/2008 6:04:47 AM
RE: Replace difficulty Posted by bryan wetton @ 12/12/2008 7:09:24 AM