Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 6 string translation

Status
Not open for further replies.

eric43

Programmer
Apr 29, 2005
94
AU
I have just tried storing a memo field in mystring -then

Code:
mynewstring = strtran(mystring,'C:\Program Files\My Program\Projects\Jones\Jones Pictures\','C:\My Store\Pics')

I still see the original content in mynewstring.

What am I doing wrong please.

Eric
 
I dont see anything wrong with the code. It works on my machine. However, by default the search is case sensitive. Are you sure that the case of your searched string in your memo field matches exactly with what you have entered in strtran?


 
It might also depend on what you actual mean to change/end-up with. Are you sure that the 2nd and 3rd parameters are not reversed?
 
If your example is what you really want to do, consider using FORCEPATH() rather than STRTRAN().

Tamar
 
Thanks for the suggestions - after using upper() on both sides of the expression I got it to do what I wanted.

The other suggestions are valuable and may come in handy another time.

Thanks again

Eirc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top