|
-
Nov 11th, 2000, 08:17 AM
#1
Thread Starter
Member
is it possible to open a file for input and for output at the same time??
i mean writing into the file....while reading from it
???
-
Nov 11th, 2000, 09:55 AM
#2
Frenzied Member
If you open a file for ex. input you won't be able to do anything to the file until you use close#1. After this you will be able to open the same file for output. But this is not at the same time. At the same time you can't do both operations to a file.
-
Nov 11th, 2000, 10:02 AM
#3
Frenzied Member
I think when you Open a File for Binary you'll be able to Get and Put at the same time... maybe I'm just brabbling bullshit, I have no time to check it now, but if you need help look at http://www.kedaman.com
he has a great file tutorial.. < hey keda, tha'll be $5 please.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 11th, 2000, 10:13 AM
#4
Lively Member
Put and Get should work, but if you don't want to access your file in binary mode you can open it in random mode
open "yourfile" for random as #1
this mode allows both Read and Write
-
Nov 12th, 2000, 06:24 PM
#5
Thread Starter
Member
But..
<Krushstone>
but will i be able to use the "input" command when i do
open SomeFile for random as #1
text1.text = input$(lof(1),1)
and
input #1,s
close #1
i hate using the "write" command because it leaves the ""
anyway...i could try binary access as you all said
i'm building a program which in it a counter will be included , telling the user how many times he used my program...
my problem suppose to be a replacment for notepad and if my program starts opening and closing files on the form_load event, it will be slower...and the user might decide to use the ordinery notepad instead of mine.
will it faster to read and write to the registry at the form_load event? if so....please tell me how to write to the registry and to read from it..
thanks...
-
Nov 12th, 2000, 07:21 PM
#6
Lively Member
no... you can't use input in random mode
you'll have to use put and get...
this page could be useful to help you make your choice:
http://www.vb-world.net/files/openstatement/
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
|