import
GCC
gccconsulting at comcast.net
Mon Jun 27 09:52:45 PDT 2005
> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf
> Of Kenneth Brody
> Sent: Monday, June 27, 2005 12:40 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: import
>
> Quoting GCC (Mon, 27 Jun 2005 12:08:31 -0400):
>
> > Windows native 5.0.14
> > Win XP sp 1
> >
> > I have a routine I am working on that:
> >
> > 1. Changes the directory using chdir
> > 2. uses a system command to run a batch file which runs a
> program that
> > creates a list of 5 random "passwords" to a file called pass.txt 3.
> > Use import to read in the pass file to a 5 element array
> and display
> > the results in a listbox for selecting one of the listed passwords.
>
> Did you close the import when you were done with it?
>
> > So far, so good. All works as expected.
> >
> > My problem, when I move to a new record and run the routine
> again, the
> > same group of passwords is displayed. If I exit IUA and
> the come back
> > into a record and run the routine, a new list is presented.
>
> Does the file contain new passwords?
>
> > It appears that pass.txt is locked. How would I release this file?
>
> How does it "appear" to be "locked"?
>
> > I did try aa=remove("pass.txt") and tested aa. According
> to the help
> > file, 0 means the file was removed and a negative number
> indicates the
> > remove failed.
> > Does anyone know what a positive 1 indicates?
>
> Is there such a thing as a "-1" system error code?
>
> If you never closed the import, then filePro will be
> positioned at the end of the pass.txt file. (Or at least,
> not at the beginning, if the new set of passwords is longer
> than the old.) The next thing filePro will try to get from
> the file is the non-existent 6th password. Is the import
> simply failing the second time through?
>
> Also, Windows will not let you remove a file that's open by someone.
>
Ken,
To answer your last question, the file being imported was always the same group
of 5 passwords.
As per my last post, which may not have been received yet, I did add close pass
(the alias) after the import and it worked.
In looking a the docs on close, it indicates:
Use CLOSE filename to close an individual file, where "filename" is a lookup
file name, or an export file name. CLOSE can be used on all processing tables.
However, it does not say that it works with import, just export.
My conclusion is that filePro treads import and export as a special form of
lookup file thereby allowing close filename to work as if the file was a lookup
file.
Richard Kreiss
GCC Consulting
More information about the Filepro-list
mailing list