Page 2 of 2
Re: Using CSV as reference file
Posted: Tue May 26, 2020 10:59 pm
by wlaughto
ghettocottage wrote: Tue May 26, 2020 2:41 pm
I have an external CSV file which is developed and updated periodically by a 3rd party and is access via HTML - e.g. put url "
https://www.matthewproctor.com/Content/ ... tcodes.csv" into tPostcodeData.
how often is this csv file updated? where does this file live normally? who puts it on the server?
I ask, because a slightly different approach could be to have a simple script on your server that imports/updates a mysql database every night ( or more often).
then you work with the database rather than having to churn through a csv file. The server would do the heavy work for you so your app could just request a small bit of info at a time.
The file is maintained by a third party, updated periodically and lives on their server.
Re: Using CSV as reference file
Posted: Wed May 27, 2020 2:11 am
by wlaughto
Thank you to all respondents, most valuable information. I have not yet tried the latest code from mrcoollion, AxWald or richmond62, however will today.
As a comment/query, I was a bit surprised at the results AxWald demonstrated - very impressive. However I would assume that with a much larger dataset (say up 1 million plus records), it would be necessary to use a database as was suggested by ghettocottage?
richmond62, yes agree that a picture is worth a thousand words, but what is a thousand words worth? Well a much smarter man than me came up with the following- A computer word is 16 bits. 2 bits (old American monetary denomination) = 1 quarter (25c). 1 bit is 12.5c. Therefore a word is worth $2, ipso facto, a picture is worth $2,000. Eugene Volokh (~1980)
Re: Using CSV as reference file
Posted: Wed May 27, 2020 6:04 am
by wlaughto
Have now tested the different code snippets and they are blazingly quick - much faster than I thought. Perfect for my requirements.
Thank you for all contributions.