borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Install Something) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Reading and writting data in a file
Poster Message
iliekater
Level: Master

Registered: 04-02-2005
Posts: 129

icon Reading and writting data in a file

I know one can use the Open for Input and the Open for Output statements , but is there a way to write in a file on specific line ?
For example , in a file of mine I have stored some variables :

.....
"air" , "3" , "bla bla bla"
......

I want to go and write directly on the line above , not to write the whole file again . Is it possible ? Let me specify here that I know the exact line (number or row) at which I want to write my new variables . The problem is how do I write at exactly that line ? ...

05-04-2008 at 11:06 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1635
icon Re: Reading and writting data in a file

I don't think that is is possible without writing out the entire file again... you could (possibly) start writing from point x to y in a file (i.e. overwrite a certain spot), but if the new text is longer or shorter than the old you'd end up with potential problems.

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

08-04-2008 at 02:51 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
iliekater
Level: Master

Registered: 04-02-2005
Posts: 129
icon Re: Reading and writting data in a file

Oh well . Thanks anyway JLRodgers .

08-04-2008 at 09:35 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Reading and writting data in a file
Next Topic (Install Something) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder