|
-
December 28th, 1999, 10:45 PM
#1
Files
How do we open a file for both reading and writing in VB? In VC++, we have a mode "r+" which will allow us to open a file for both reading and writing. I the same way, do can we open a file for both reading and writing ?
Thanks
-
December 29th, 1999, 01:52 AM
#2
Re: Files
Open pathname For mode [Access access] [lock] As [#]filenumber [Len=reclength]
where
access : Read, Write, Read Write
BTW this is described in MSDN/VB help files
-
December 29th, 1999, 02:00 AM
#3
Re: Files
Using Access Mode, you can open file for read/write, for example:
Open "filename.txt" For Append Access Read Write As #1 --> a+
Open "filename.txt" For Input Access Read Write As #1 --> w+
Good Luck!
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
|