|
-
Jan 11th, 2000, 04:35 AM
#1
Thread Starter
Lively Member
Could someone give me a brief description of how the file numbers work in manipulating files (i.e. opening, reading, writing, closing)? One particular that I am interested in: are the file numbers particular to the program involved or global to the machine? Thanks.
-
Jan 11th, 2000, 04:55 AM
#2
I assume they are particular to the program running. I'm going to guess that you are concerned with assigning a number already in use. If that's the case, always use code like the following:
Code:
intFileNbr = FreeFile
Open MyFile For Input As intFileNbr _File
------------------
Marty
-
Jan 11th, 2000, 05:02 AM
#3
Thread Starter
Lively Member
Actually, I ran into a problem that I was hoping I could help solve with this answer. I have a program that goes through a couple of web pages, finds a particular page, pulls and formats the page, and saves it as a text file. During a run, I spawn about 15 of these programs. The problem is that occasionally two of the programs seem to write to the same file. I am currently using FreeFile, but was wondering if this could be a problem with grabbing and writing to the same file number. Thanks.
-
Jan 11th, 2000, 06:25 AM
#4
Could you solve your problem by appending a unique number (perhaps the spawned number) or string to the file names?
------------------
Marty
-
Jan 11th, 2000, 06:50 AM
#5
Thread Starter
Lively Member
Thanks for your help. I actually discovered that my problem was else where. Additionally, according to the MSDN help (which I failed to scour earlier), file numbers are exclusive to the program. I guess I need to hunt better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|