01-08-2018 06:41 AM
I built a huge VI to monitor a person details.
i wanted to modify this VI to be for several people.
i don't have any access to any of SQL or SQL Server Express, neither MS Access to build a database.
my only option is using CSV file as a database.
writing to a CSV file is not a problem to me.
reading the details is my problem.
in the VI i have a user ID, age, weight, gender, etc..... if i want to retrieve a data for one specific user, i should look into his ID. when i find this user, i should retrieve all the data that belongs to this ID.
is there any link or a demo can let me learn this technique. i know i should user Search 1D array to look for the user ID, but up to the minute i don't know how to make it in the right way.
any suggesting ?
01-08-2018 06:58 AM
Read the file with Read from spreadsheet file, Index array to get the ID column, Search 1D array to find which row and Index array to get the user row.
/Y
01-08-2018 07:45 AM
i tried this way, and i'm still not able to make it.
01-08-2018 07:47 AM
01-08-2018 08:15 AM
Hi GerdW,
this is a mock up of what i'm doing exactly in my VI.
and i know i'm doing it wrong, but i never used Search 1D array before
Thanks
01-08-2018 08:43 AM
Hi N.,
what exactly does not work as intended?
In your VI you are
- reading a CSV file with each iteration, getting the first column and searching for something in this (column) array
- not using the search result
- appending the the very same CSV file a new line of user information
- doing all that in a loop again and again, without any timing (your file will get very big very fast)
01-08-2018 09:02 AM
the first and second point i didn't get them very well.
i wanted to append the file
and in my actual VI i'm using QMH, so i'm writing only once when i needed
01-08-2018 09:05 AM
01-08-2018
03:19 PM
- last edited on
04-14-2025
01:47 PM
by
Content Cleaner
Well, you could try SQLite and theSQLite Library for LabVIEW by Dr. James Powell.
- https://www.ni.com/en/support/downloads/tools-network/download.sqlite-library.html
Free, easy to work with, good examples and documentation and far superior to CSV.