🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #7010

Re: LOF maximum lengte 2048 ?

#7010
From: Egg
Date: Thu, 24 Oct 2002 21:04
42 lines
2478 bytes
"Bart Vanwijnsberghe" <bartvanwijnsberghe@DELETE!!SPAMyahoo.com> wrote in
message news:bmYt9.177078$8o4.28363@afrodite.telenet-ops.be...
> Ik zou moeten een file inlezen in een tekstbox in Access XP. Ik heb
daarvoor
> volgende code:

Echt niet!
Zie de verbeterde code.
ps: Input$ (of Input voor variantjes) is alleen voor binary data. Als je het
open 'for input' dan heb je inderdaad je limiet van 2048.
Als je regel voor regel wilt lezen gebruik je dus Line Input #hFile, sRegel$


> Private Sub Form_Load()
>     Dim file As String
>     file = "D:\Mijn documenten\testAccess\test.html"
Dim hFile as Integer
hFile = FreeFile
>     Open file For Binary As #hFile
>     FileLength = LOF(hFile)
>     Debug.Print FileLength
>     mailtekst.SetFocus
     mailtekst.Text = Input(LOF(1), #1)

Mailtext.Text = Input$(Lof(hFile))
Close #hFile


>     Close
> End Sub
>
> LOF mag blijkbaar maar 2048 zijn.  Als er meer dan 2048 tekens zijn in
mijn
> bestand krijg ik de fout: "Fout 2176 tijdens uitvoering: De instelling
voor
> deze eigenschap is te lang".
>
> Is er een andere mogelijkheid om een grotere file in te lezen ?
>
> mvg
> Bart
>
Technical Details
Message-ID: <ap9n9s$p5d$1@beast.euro.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!easynet-quince!easynet.net!proxad.net!proxad.net!news-hub.cableinet.net!blueyonder!newspeer1-gui.server.ntli.net!ntli.net!news2.euro.net!news.euro.net!not-for-mail
References: <bmYt9.177078$8o4.28363@afrodite.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,dc7e0de2aed95b63
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,dc7e0de2aed95b63
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-10-24 14:56:29 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!easynet-quince!easynet.net!proxad.net!proxad.net!news-hub.cableinet.net!blueyonder!newspeer1-gui.server.ntli.net!ntli.net!news2.euro.net!news.euro.net!not-for-mail
From: "Egg" <nospam@nospam.com>
Newsgroups: be.comp.programming,nl.comp.programmeren
Subject: Re: LOF maximum lengte 2048 ?
Date: Thu, 24 Oct 2002 23:04:46 +0200
Organization: Egg
Lines: 43
Message-ID: <ap9n9s$p5d$1@beast.euro.net>
References: <bmYt9.177078$8o4.28363@afrodite.telenet-ops.be>
NNTP-Posting-Host: asd-btv-a042.mxs.adsl.euronet.nl
Mime-Version: 1.0
Content-Type: text/plain;
 charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Trace: beast.euro.net 1035493500 25773 194.134.189.66 (24 Oct 2002 21:05:00 GMT)
X-Complaints-To: abuse@euronet.nl
NNTP-Posting-Date: Thu, 24 Oct 2002 21:05:00 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106