Re: Need Help deleting record from text file



"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



.



Relevant Pages

  • Re: Why sorting binary data is so slow?
    ... (there are many of them for one data file) ... And I must read whole array from disk to make it work... ... If you need a database, ... SQLite DB will provide persistency and allow fast searching. ...
    (comp.lang.tcl)
  • Re: Need Help deleting record from text file
    ... All I said was that for some operations a database is ... If you are going to do a binary search of an array then you need the whole ... The OP is as you say reading in the data to an array - He then needs to ... which will be either the flat file or the database, ...
    (microsoft.public.vb.general.discussion)
  • Re: Storing & Retrieving Images in SQL Mobile
    ... Unless I am missing something you do not seem to be reading the file ... contents into the byte array. ... So after your Dim img as Byte... ... > into the database, the other reads it back out, I'm not doing any ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: fill in 3D array
    ... I am reading in a 1-D data file with 2000 ... I need to put them in a 3-D array with size. ... There is no need, in this case, to create an array before reading the data. ... "I have come to believe that the whole world is an enigma, a harmless enigma ...
    (comp.lang.python)
  • Re: Really Stuck, Please Help
    ... I am not sure how to construct an array. ... Reading Master Log", of the "Copreco Master Log" workbook. ... Dim sourceBook As String ...
    (microsoft.public.excel.programming)