DanielEvansJr
Programmer
Fox: Visual FoxPro 6 / SP5 & Visual FoxPro 9 / SP2
OS: Windows 7 Professional & Windows 10 Professional
I have a legacy application that imports data from a text file of wage information. Each data line is SSN, Name, Wage. As you can expect, these wage files can get quite large, a few hundred MB sometimes.
The data from the wage file is imported into a memo field of a FoxPro table.
append memo xmemo.xmemo from (m.drive_file)
This works as it should, even with files nearing 400MB.
Then there's some code that verifies and checks the new data in the memo field for things that may need to be stripped out. (linefeeds and carriage returns). The code that does this uses the OCCURS() function.
m.nchr10 = occurs(chr(10), xmemo.xmemo) && count for line feeds
m.nchr13 = occurs(chr(13), xmemo.xmemo) && count for carriage returns
Within the last week, the above two lines have failed with the error "String is too long to fit". Smaller wage files (about 60MB or so), will work fine. But anything larger than that will throw the error. I can even reproduce the error from the command line with
?occurs("x", xmemo.xmemo) && show a count of 'x' characters.
Background:
1. This application has been in production for over 20 years and has taken large files without issue all of that time.
2. I can reproduce the error in Fox 6 and Fox 9.
At this point, I'm stumped. Anyone have any idea what the issue is? Thanks in advance to anyone that can offer some help.
OS: Windows 7 Professional & Windows 10 Professional
I have a legacy application that imports data from a text file of wage information. Each data line is SSN, Name, Wage. As you can expect, these wage files can get quite large, a few hundred MB sometimes.
The data from the wage file is imported into a memo field of a FoxPro table.
append memo xmemo.xmemo from (m.drive_file)
This works as it should, even with files nearing 400MB.
Then there's some code that verifies and checks the new data in the memo field for things that may need to be stripped out. (linefeeds and carriage returns). The code that does this uses the OCCURS() function.
m.nchr10 = occurs(chr(10), xmemo.xmemo) && count for line feeds
m.nchr13 = occurs(chr(13), xmemo.xmemo) && count for carriage returns
Within the last week, the above two lines have failed with the error "String is too long to fit". Smaller wage files (about 60MB or so), will work fine. But anything larger than that will throw the error. I can even reproduce the error from the command line with
?occurs("x", xmemo.xmemo) && show a count of 'x' characters.
Background:
1. This application has been in production for over 20 years and has taken large files without issue all of that time.
2. I can reproduce the error in Fox 6 and Fox 9.
At this point, I'm stumped. Anyone have any idea what the issue is? Thanks in advance to anyone that can offer some help.