473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to put a big file into a variable?

Hello,
I'm not able to put a big file (600Mo) into VarDonnéesDuFichier3 .
With the MsgBox line, VarDonnéesDuFichier3 displays zero (o). Where is my
problem? Is there an other way to open a big file (600Mo) into
VarDonnéesDuFichier3 (with the special data like a mpeg) ?

Dim VarDonnéesDuFichier3 as String
NumFichier = FreeFile
Open Text2.Text For Binary Access Read As #NumFichier
VarDonnéesDuFichier3 = Space$(LOF(NumFichier))
MsgBox VarDonnéesDuFichier3 'VarDonnéesDuFichier3 gave zero (0) with a 600
Mo file.
Get #NumFichier, 1, VarDonnéesDuFichier3
Close #NumFichier
========================================
a+
Raymond H.
--
di*******@hotmail.com
Jul 17 '05 #1
5 4382
Uh, yea, no kidding! For a messagebox, try 250 or so characters, not 600mo
(whatever a mo is).

To open and read a large file use Binary file access and do the reading in
chunks of 64k.

--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Raymond H." <di*******@hotmail.com> wrote in message
news:hN*********************@news20.bellglobal.com ...
: Hello,
: I'm not able to put a big file (600Mo) into VarDonniesDuFichier3 .
: With the MsgBox line, VarDonniesDuFichier3 displays zero (o). Where is my
: problem? Is there an other way to open a big file (600Mo) into
: VarDonniesDuFichier3 (with the special data like a mpeg) ?
:
: Dim VarDonniesDuFichier3 as String
: NumFichier = FreeFile
: Open Text2.Text For Binary Access Read As #NumFichier
: VarDonniesDuFichier3 = Space$(LOF(NumFichier))
: MsgBox VarDonniesDuFichier3 'VarDonniesDuFichier3 gave zero (0) with a
600
: Mo file.
: Get #NumFichier, 1, VarDonniesDuFichier3
: Close #NumFichier
: ========================================
: a+
: Raymond H.
: --
: di*******@hotmail.com
:
:

Jul 17 '05 #2
Hello,
mo is MegaBytes in french (MB). Do you have an axample about your
'chunks of 64k'?
a+
Raymond H.

"Randy Birch" <rg************@mvps.org> a écrit dans le message de news:
O4********************@rogers.com...
Uh, yea, no kidding! For a messagebox, try 250 or so characters, not
600mo
(whatever a mo is).

To open and read a large file use Binary file access and do the reading in
chunks of 64k.

--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Raymond H." <di*******@hotmail.com> wrote in message
news:hN*********************@news20.bellglobal.com ...
: Hello,
: I'm not able to put a big file (600Mo) into VarDonniesDuFichier3 .
: With the MsgBox line, VarDonniesDuFichier3 displays zero (o). Where is
my
: problem? Is there an other way to open a big file (600Mo) into
: VarDonniesDuFichier3 (with the special data like a mpeg) ?
:
: Dim VarDonniesDuFichier3 as String
: NumFichier = FreeFile
: Open Text2.Text For Binary Access Read As #NumFichier
: VarDonniesDuFichier3 = Space$(LOF(NumFichier))
: MsgBox VarDonniesDuFichier3 'VarDonniesDuFichier3 gave zero (0) with a
600
: Mo file.
: Get #NumFichier, 1, VarDonniesDuFichier3
: Close #NumFichier
: ========================================
: a+
: Raymond H.
: --
: di*******@hotmail.com
:
:

Jul 17 '05 #3

"Raymond H." <di*******@hotmail.com> skrev i en meddelelse
news:hN*********************@news20.bellglobal.com ...
Hello,
I'm not able to put a big file (600Mo) into
VarDonnéesDuFichier3 .


Why would you want to ??? No human will like to read 600Mb just
like that ;-)

And in a Msgbox ???

--
/\ preben nielsen
\/\ pr**@post.tele.dk
Jul 17 '05 #4
Hello,
it's for a software, not cessessary for the humain read but for the
traitement in the software.
a+
Raymond H

"preben nielsen" <pr**@post.tele.dk> a écrit dans le message de news:
41*********************@dread12.news.tele.dk...

"Raymond H." <di*******@hotmail.com> skrev i en meddelelse
news:hN*********************@news20.bellglobal.com ...
Hello,
I'm not able to put a big file (600Mo) into VarDonnéesDuFichier3 .


Why would you want to ??? No human will like to read 600Mb just like that
;-)

And in a Msgbox ???

--
/\ preben nielsen
\/\ pr**@post.tele.dk

Jul 17 '05 #5
"Raymond H." <di*******@hotmail.com> wrote in message
news:hN*********************@news20.bellglobal.com ...
Hello,
I'm not able to put a big file (600Mo) into VarDonnéesDuFichier3 .
With the MsgBox line, VarDonnéesDuFichier3 displays zero (o). Where is my
problem? Is there an other way to open a big file (600Mo) into
VarDonnéesDuFichier3 (with the special data like a mpeg) ?

Dim VarDonnéesDuFichier3 as String
NumFichier = FreeFile
Open Text2.Text For Binary Access Read As #NumFichier
VarDonnéesDuFichier3 = Space$(LOF(NumFichier))
MsgBox VarDonnéesDuFichier3 'VarDonnéesDuFichier3 gave zero (0) with a 600 Mo file.
Get #NumFichier, 1, VarDonnéesDuFichier3
Close #NumFichier


Did you try using a Richtextbox instead?
Maybe there is a better way of reading 600Mb worth of data. If you elaborate
why you need it in a continuous string maybe someone can figure out an
alternative way.
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Franck Perrin | last post by:
I'd like to know if there is a way to apply to successive XSL transformations on one XML file. I got this XML file : <page Action="N047"> <data defaultName="c0dos010" Type="String"...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
6
by: shaun | last post by:
If I put (define) const variables at the top of a .cpp file but do not declare them in the .h file, are they only visible within that .cpp file? e.g. const int a={1,2,3,4}; in a cpp file...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
7
by: pbd22 | last post by:
Hi. I am somewhat new to this and would like some advice. I want to search my xml file using "keyword" search and return results based on "proximity matching" - in other words, since the search...
10
by: olivier.scalbert | last post by:
Hello, the following constraints: source: <Source> <Item>AAA</Item> <Item>BBBBBBBBBBB</Item> <Item>CCCCCCCCC</Item> <Item>DDDDDDDDDDDDDDD</Item>
0
by: jebbyleezer | last post by:
Hello, I have source code that builds correctly, however, after the program terminates the output file produced is empty. Here is my source code: import java.io.*; import java.util.Scanner;...
1
by: dwaterpolo | last post by:
Hi Everyone, I am trying to read two text files swY40p10t3ctw45.col.txt and solution.txt and compare them, the first text file has a bunch of values listed like: y y y y y y y
11
by: whirlwindkevin | last post by:
I saw a program source code in which a variable is defined in a header file and that header file is included in 2 different C files.When i compile and link the files no error is being thrown.How is...
9
by: Matthew Wells | last post by:
OK, I've narrowed down the problem. This works when in the aspx page <script type="text/javascript" > function btnFirst_Click() { alert("Hello");...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.