Postcode Search - Forum

Forum Navigation
You need to log in to create posts and topics.

Postcode Search

I want to add a Postcode search, within my project. Within the Windows version this is simple, this is my first time working with the web. The data is only 5 fields:-  Postcode / Area / Source / Effective From / Effective To. The last two fields can be remove.

What is needed is, if the postcode is within this data ( some 800,000 records ) it will come back the answer Yes.

This answer will also be used to remove courses that can not be provided, for people living with these postcode.

So, the question is, where do I start?

yours

Michael

@m-burdess

The data is only 5 fields:- Postcode / Area / Source / Effective From / Effective To. The last two fields can be remove.

What is needed is, if the postcode is within this data ( some 800,000 records ) it will come back the answer Yes.

You don't say what kind of database these records are stored in.

Also, where (on local drive where the WebApp is running OR on a remote server) the database is located.

Within the Windows version this is simple, this is my first time working with the web.

Perhaps you can provide details of the database and your script.

luishp has reacted to this post.
luishp

@gaev

Sorry for the poor details, The data is at present in the for of a CSV file, and on my computer. The goal is to enable people to check the data, via the web. So, the complete system will be on the Web. I'm looking at using CloudNEO to host the site.

The question you have asked, about location of the database and type, are the things that I do not know what is best for this type of system.

@m-burdess as your database is so simple I will consider using SQLite.
There are many online services to import your .csv data into a SQLite database:

https://numidian.io/convert/csv/to/sqlite
https://www.rebasedata.com/convert-csv-to-sqlite-online

VisualNEO Web comes with some database app samples you can check out.

@m-burdess
@luishp

According to this website ... https://www.sqlitetutorial.net/sqlite-import-csv/ ... the sqlite database program comes with built in facilities to import/create sqlite database tables from csv files.

The data is at present in the for of a CSV file, and on my computer. The goal is to enable people to check the data, via the web.

The data is only 5 fields:- Postcode / Area / Source / Effective From / Effective To. The last two fields can be remove.

What is needed is, if the postcode is within this data ( some 800,000 records ) it will come back the answer Yes.

Within the Windows version this is simple

If you do not want to get into databases, and this is the only function you need to perform with this set of data, you can ...

- upload the csv file from your computer to a folder on your website
- use the FileToVar command to load the contents of this file into a variable
- after that, the commands to search would be the same as in your VisualNEOWin application

However, because of the 800,000 records (and assuming 40 characters per record/line), 32 MB is a lot of data to download from a server every time your App is deployed ... so, I would suggest you split the file into parts ... either by (first letter of) PostCode or Area (depending on your needs) ... and then do a FileToVar on the specific subset file.