Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text file problem
Message
 
To
06/09/2000 18:11:10
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00413222
Message ID:
00413274
Views:
24
>This may seem a little bit stupid question but, I need help.
>
>I have a text file.
>I have to position myself at the end of the file and write to it.
>I have define a type:
>
>Public Type tPost
>    sCustomerCode As String * 7
>    (...)
>    sTVQAmt As String * 9
>End Type
>
>The way I figured it is with this code:
>
>Dim tTemp As tPost
>Dim tGood As tPost
>Dim a as Integer
>
>Open FILE For Random As #1 Len = Len(tTemp)
>Do While Not EOF(#1)'goto end of file
>    a = a + 1
>    Get #1, a, tTemp
>Loop
>Put #1, a, tGood 'write something
>Close #1
>End Sub
>
>
>But, something is going wrong, because, the line is not written at the end of the file... (somehwere near, but not at the end)
>
>Do I have the good method to do want I want?

Is it possible that you simply forgot to increment "a"?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform