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

Help on how to locate for corrupted Memo fields

Status
Not open for further replies.

angelleynes

Programmer
Dec 28, 2001
46
0
0
US
I need help on how to quickly find a corrupted memo field,
like a weird character inside the memo field...

thanks in advance!
 
Just to be clear, is it the Memo file (.FPT) that is corrupted, or is it that the links are fine, but some of the data fields have corrupted data in them?

Rick
 
well, I'm looking for a data in the memo field.

thanks!
 
what is a weird character ?

ascii values greater then 125? if so
cvar = ''
for i = 126 to 254
cvar = cvar + chr(i)
endif

this builds a var with all characters above 125 (weird)

if cvar$mytable.memofield
this is were you can put code to replace the character
else
character not in filed
endif Attitude is Everything
 
you can also test the ascii value of every character in your string and delete it if it is not in the valid range by:

x_memo = yourtable.memo
n_memo = "
for i = 1 to len(alltrim(nMemo))
n_memo = iif(asc(substr(x_memo,i,1)) < 32;
.or. asc(substr(x_memo,i,1)) > 126,&quot;,;
substr(x_memo,i,1))
endfor
replace yourtable.memo with n_memo

hope this helps.
 
correction: for i loop should read:
for i = 1 to len(alltrim(x_memo))...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top