Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text file problem
Message
From
06/09/2000 18:11:10
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Text file problem
Miscellaneous
Thread ID:
00413222
Message ID:
00413222
Views:
49
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?
Next
Reply
Map
View

Click here to load this message in the networking platform