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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STRTRAN not removing character

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

Hi

The following is run to remove the character ; from a MEMO field within a table:
Code:
VAR3 = COLUMN3
REPLACE COLUMN3 WITH STRTRAN(VAR3, ';', " ")
This works with all other fields in the table but not with COLUMN3 which is a MEMO field.

The process we are using creates a CSV file for upload to a server and this is causing havov with MySQL 5.

Can anyone suggest why this doesn't work for a memo field but does for any other character field?

Thank you guys

Lee

 
try chrtran()

Ali Koumaiha
TeknoPCS Inc.
Dearborn heights, MI 48127
 

Hi Ali

ok, the help file gives an example:

? CHRTRAN('ABCDEF', 'ACE', 'XYZ') && Displays XBYDZF
? CHRTRAN('ABCD', 'ABC', 'YZ') && Displays YZD
? CHRTRAN('ABCDEF', 'ACE', 'XYZQRST') && Displays XBYDZF

So if I store the MEMO field to VAR3 how do I get the character ; removed form the field?

Lee
 

Sorry that should have said, "....removed from the field?
 
Hi Lee,

Your code works fine for me in a memo field. Is it possible you're meaning to do a REPLACE ALL rather than just REPLACE?

Jim
 
Your original logic works fine for me.
Is it not repopulating the memo field correctly?
Is there by chance, a table in another work area at EOF()?
Did you test the results - as in,
Code:
VAR3 = COLUMN3
VAR3 = STRTRAN(VAR3, ';', " ")
?VAR3
REPLACE COLUMN3 WITH VAR3



-Dave Summers-
[cheers]
Even more Fox stuff at:
 

All

If I could show a red face here I would.

The command was being issued BEFORE another field in another table was being replaced. So the ; would have never been removed in a million years.

Now the coding has been "Altered" it works fine.

That's what happens when you inherit someone else's code but no excuses on my part.

Thanks again for your time (hope it wasn't wasted).

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top