![]() | |
#11
| |||
| |||
|
|
The problem is that I'm a dreamer. I imagine that the people who send me lousy files will walk into a bar and by pure chance, meet the people who have been sending me good files for the past 10 years. They will be enlightened. I will be happy. |
#12
| |||
| |||
|
|
What you probably should do, though, is to write a few lines of code to scan through the file prior to import, and tidy up all sick CRs, LFs, EOFs, Commas, etc. Then, you can dream even more... happily... IN that bar... g - Mike The problem is that I'm a dreamer. I imagine that the people who send me lousy files will walk into a bar and by pure chance, meet the people who have been sending me good files for the past 10 years. They will be enlightened. I will be happy. |
#13
| |||
| |||
|
|
Using PdoxDOS 4.5, trying to import a text file with 13000 lines in nice, orderly columns, 95 chars per line. This is not rocket surgery - I've been doing this for years. This time, however, I run the import and get this: Action = Overwrite 0 records processed Import Complete 1 Records Imported 0 Errors Detected Press any key to continue.... Checking the resulting table, I find just one record. Makes no sense, but here's a clue. If I open the source text file (in WinEdit) and go to the end of any line (using the END key), I find I'm at column 96. But, if I use Flimport to check record length, it shows a result of 32500. Very odd. Any thoughts on this issue? |
#14
| |||
| |||
|
|
JoeSpareBedroom wrote: Using PdoxDOS 4.5, trying to import a text file with 13000 lines in nice, orderly columns, 95 chars per line. This is not rocket surgery - I've been doing this for years. This time, however, I run the import and get this: Action = Overwrite 0 records processed Import Complete 1 Records Imported 0 Errors Detected Press any key to continue.... Checking the resulting table, I find just one record. Makes no sense, but here's a clue. If I open the source text file (in WinEdit) and go to the end of any line (using the END key), I find I'm at column 96. But, if I use Flimport to check record length, it shows a result of 32500. Very odd. Any thoughts on this issue? It is almost certain that the line-termination character sequence (usually CR/LF) is not present in this file. Any sort of hexadecimal file-editor will probably show you the problem. You might find that simply loading the file into an editor, and saving it again as a text file, will solve the problem. But ... "what changed?" Did someone alter the tool that generates that file? |
#15
| |||
| |||
|
|
What you probably should do, though, is to write a few lines of code to scan through the file prior to import, and tidy up all sick CRs, LFs, EOFs, Commas, etc. Then, you can dream even more... happily... IN that bar... g - Mike |
#16
| |||
| |||
|
|
OK....so I do what? Import the text file into one big field in a table, and search for the sick/missing characters using their ASCII codes? |
#17
| |||
| |||
|
|
JoeSpareBedroom wrote: OK....so I do what? Import the text file into one big field in a table, and search for the sick/missing characters using their ASCII codes? No, the largest ALPHA field size in Paradox is 255 bytes. But you have a good idea. There are many ways to attack your problem. Here's one. If there are no CR/LF pairs throughout the file and the length of each "record" is a fixed number of bytes, then you could write ObjectPAL code using TextStream to to read x number of bytes and then write x number of bytes plus the CR/LF characters to an output file, looping until you are finished. Perhaps there is some software out there that will parse a long record into many short ones. |
#18
| |||
| |||
|
|
OK....so I do what? Import the text file into one big field in a table, and search for the sick/missing characters using their ASCII codes? |
![]() |
| Thread Tools | |
| Display Modes | |
| |