Re: Need Help deleting record from text file
- From: "Mike Williams" <mikea@xxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Sep 2007 11:42:37 +0100
"Dave O." <nobody@xxxxxxxxxxx> wrote in message news:u6TkcoOAIHA.4732@xxxxxxxxxxxxxxxxxxxxxxx
Entering data into a database will be a bit slower
as it indexes the data on entry however retrieval
will be faster.
Faster than what?
The other main speed advantage is that opening a
database should be a lot faster than reading the
whole array into memory.
Who said you need to read an entire array into memory just to access a small portion of it? I certainly never suggested that. If you need to save a very large array to disk as a data file you can use standard VB I/O code to do it efficiently. If you write the data in a suitable format you can later open the data file by reading just a relatively small header chunk and then read in the elements or the portion of data you require. This method will work for all data types, including large variable length strings, if you write the code properly. Obviously the indexing method chosen will vary depending on the circumstances and on the kind of data and the kind of uses you are likely to put it to, but it certainly is possible to do this stuff very effieciently in ordinary VB code without needing to use a standard "database". Databases do not contain "alien magic" ;-)
Besides, the OP is reading his data (the names of the files contained in a specific folder) using FindFirstFile and FindNextFile (presumably) and dumping that data (the names of the files) directly in to a VB string array and then sorting the array. How is using a database going to speed up that operation!
Mike
.
- Follow-Ups:
- Re: Need Help deleting record from text file
- From: Darhl Thomason
- Re: Need Help deleting record from text file
- From: Dave O.
- Re: Need Help deleting record from text file
- References:
- Need Help deleting record from text file
- From: Norm
- Re: Need Help deleting record from text file
- From: Dave O.
- Re: Need Help deleting record from text file
- From: David Kerber
- Re: Need Help deleting record from text file
- From: Norm
- Re: Need Help deleting record from text file
- From: Dave O.
- Re: Need Help deleting record from text file
- From: Mike Williams
- Re: Need Help deleting record from text file
- From: Dave O.
- Need Help deleting record from text file
- Prev by Date: Re: Need Help deleting record from text file
- Next by Date: Re: how convert vc++ code into vb?
- Previous by thread: Re: Need Help deleting record from text file
- Next by thread: Re: Need Help deleting record from text file
- Index(es):
Relevant Pages
|