Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text file problem
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00413222
Message ID:
00413274
Vues:
26
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform