Answer» Hello,
I would like to know how to load the contenet of a file to an ARRAY in vb.net. Example:
file.db: hello, hi good bad
Array: INDEX1 = hello, index2 = hi index3 = good index4 = bad
Thanks
Al968
There is always the brute force method, read a record, redim the array, push the record into the array.
If this were a text file you can use the File.ReadAllLines(string) method, but since I notice your file name is a database, go with the brute force method and use ADO access methods for file.db
Happy Programming. 8-)You could include a NUMBER as the first entry of a file that TELLS you how many enteries there are. Or, if you pad all enteries out to a certain length, you can CALCULATE from the file size, but that is disk space inefficient.
|