"Garbage" added at end of file 
Author Message
 "Garbage" added at end of file
Hello,

I use Paradox 4.0 to open some text files, add information and save them in
text format still.
For some reason, my Paradox program adds some "garbage", exactly one line at
the beginning and one line at the end of each file.

Here is the relevant code for the import script:
...
{Tools} {ExportImport} {Import} {ASCII} {AppendDelimited} {filename}
...
and for the export script:
...
{Report} {Output} {ScriptName} {1} {File} {destination_filename} {replace}
...

Thanks for help
N! Xau



Sat, 24 Dec 2005 04:01:48 GMT
 "Garbage" added at end of file

If you examine the end of the file, you probably have a carriage return and
linefeed.  That is normal.

You may also have a null character, end-of-file marker.

--
--
Tony

"I woke up and was able to get myself out of bed.
Being that fortunate, what's to complain about?"
_____________



Sat, 24 Dec 2005 04:09:05 GMT
 "Garbage" added at end of file


Quote:

> If you examine the end of the file, you probably have a carriage return
and
> linefeed.  That is normal.

> You may also have a null character, end-of-file marker.

No, Tony, it's a sequence of 7-10 garbage characters, like ?-?? and similar.
Not always the same, they vary.
And, again, it appears at the end and also at the begin of the file.

bye
N! Xau



Sat, 24 Dec 2005 04:25:49 GMT
 "Garbage" added at end of file

"Here is the relevant code for the [import/export] script:"

I'd say you should post the IRrelevant code.

It appears that you are appending to the file.  What's in the file to begin
with, and what makes you think the export/import routines are what are
adding those characters?

--
--
Tony

"I woke up and was able to get myself out of bed.
Being that fortunate, what's to complain about?"
_____________


:


: >
: > If you examine the end of the file, you probably have a carriage return
: and
: > linefeed.  That is normal.
: >
: > You may also have a null character, end-of-file marker.
:
: No, Tony, it's a sequence of 7-10 garbage characters, like ?-?? and
similar.
: Not always the same, they vary.
: And, again, it appears at the end and also at the begin of the file.
:
: bye
: N! Xau
:
:



Sat, 24 Dec 2005 04:25:57 GMT
 "Garbage" added at end of file

Quote:

> For some reason, my Paradox program adds some "garbage", exactly one line at
> the beginning and one line at the end of each file.

like Tony said.. the import/export process isn't adding the data to the file..
either the file itself is damaged, the source table is damaged, or your code is
doing it.. the import/export is *not* doing it..

--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------



Sat, 24 Dec 2005 05:05:17 GMT
 "Garbage" added at end of file

Quote:
> and for the export script:
> ...
> {Report} {Output} {ScriptName} {1} {File} {destination_filename} {replace}

You are probably getting a printer control code string at the top of your
report and a printer reset string at the end...
goto:
{Report} {Change} {ScriptName(actually table name)} {Settings}{Setup}
and snoop around there, maybe something in CCP
goto:
alt-spacebar {Utilities} {Custom} {Reports} {Printer Setup}

pick the standard printer which should not have any set up strings

Dave



Sat, 24 Dec 2005 05:55:05 GMT
 "Garbage" added at end of file

Quote:

> You are probably getting a printer control code string at the top of your
> report and a printer reset string at the end...

yes.. I missed that one..

--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------



Sat, 24 Dec 2005 06:10:22 GMT
 "Garbage" added at end of file

Quote:
> Here is the relevant code for the import script:
> ...
> {Tools} {ExportImport} {Import} {ASCII} {AppendDelimited} {filename}
> ...

With this import script.... why are you not

{Tools} {ExportImport} {Export} {ASCII} {Delimited}

Or for that matter:

FILEREAD "myfile" TO a    ; only if you need to read whats in there

FILEWRITE APPEND "myfile" FROM stringtowrite

or

EDITOR OPEN "myfile"
CTRLPGDN
EDITOR INSERT stringtowrite

Dave



Sat, 24 Dec 2005 06:55:18 GMT
 
 [ 8 post ] 

 Relevant Pages 

1. "End-to-end" paper

2. files ending "wpw"

3. Is it the "end of log" or "end of log file"?

4. max of ("...","...","..")

5. ErrorLog: "End Stack Trace"

6. Job in "executing" status doesnt end

7. "At beginning/end of table"

8. ORA "End of communication channel" error

9. FMP5 Server password "front end" needed

10. "Begin/End Transaction" Question

11. "End of string" error message

12. AP "End-of-Life"


 
Powered by phpBB® Forum Software