Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek & Replace
Message
From
11/04/2007 14:07:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Seek & Replace
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01214576
Message ID:
01214576
Views:
58
I have been assigned to diddle with parcing a text file. I am able to get it into the proper fields in my databases however I keep erroring out when I get to the replace command. Any help would be great.
SELECT QPDATA
USE IN 0
GOTO TOP
SET STEP ON 
SCAN WHILE !EOF()
QFLD =QPDATA.FIELD    &&FIELD MARKER TO FIND
XDATA =LXPOS.INPUT   &&FIELD TO MATCH TO
ORPL =LXPOS.DATA  &&DATA INTO THE LX FILE
QPLACE = QPDATA.DATA  &&DATA FROM THE QP FILE
SET ORDER TO FIELD    && FIELD 
SEEK QFLD
	IF FOUND()
	REPLACE &ORPL WITH &QPLACE WHERE &XDATA = &QFLD
ENDIF
ENDSCAN
Next
Reply
Map
View

Click here to load this message in the networking platform