Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using information from one file to find it in another
Message
 
 
To
26/06/2008 10:20:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01326927
Message ID:
01326934
Views:
19
>>I'm trying to find a way to look for all lines in a log file that had errors and then look in the source file to extract the actual line that was processed, causing the error. Finding the occurrences of the errors and extracting out the line number isn't too tough, but how then to get to that line in the 2nd file?
>>
>>
>>Log File:
>>
>>06/25/2008 3:08:22 PM	Error	Line 1531 - Syntax error or access violation
>>
>>
>>Source:
>>
>>3224,Medical History,PT'S MEDICAL RECORDS,20080328,EXP_00FCDB0001.TIF
>>
>
>You can use filetostr() to read the file into a variable. Then use mline(yourvar,lnErrorline) to see the line

Would it work if your lines are different length? Should you know the max. number of characters in the line?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform