LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create data base from a file

Hi,
 
I would like to parse a file into a data structre (let's say array)..
Every  4 lines construct a record  (struct).
How do i read a file and construct such a database (array of record) ?
 
 
0 Kudos
Message 1 of 15
(4,033 Views)
'Database' is a broad term.  Do you want to create a flat file, binary file or a real database?  Who is consuming the data?  Are you building the data interpreter?  If you want a real database, which one are you going to use?  Do you have a DB toolkit? 

Paul
0 Kudos
Message 2 of 15
(4,031 Views)

Hi,

I have a Text File .

Each line is like a field in a record.

every 4 consecutive lines construct a record.

i want to parse the file and to create an array of records.

what is the most easiest way to do it ?

thanks

0 Kudos
Message 3 of 15
(4,021 Views)
Here's one way. This assumes that the file is only numerics and one number per line.
0 Kudos
Message 4 of 15
(4,015 Views)

Hi,

Is there something like that for string.

0 Kudos
Message 5 of 15
(3,996 Views)
You can easily modify Read From Spreadsheet File to handle strings. There are instructions on how to do that on the diagram. Save the modifications as a new name (i.e. Read Strings From Spreadsheet File) and in a new location.
0 Kudos
Message 6 of 15
(3,991 Views)
Like such

Paul
0 Kudos
Message 7 of 15
(3,988 Views)
Hi ,
Can you please tell me what component is the right most component ?
 
0 Kudos
Message 8 of 15
(3,972 Views)
Hi ,
Can you please tell me what component is the right most component ?
 
0 Kudos
Message 9 of 15
(3,972 Views)
It's your cluster array. It LabVIEW, structures are called clusters. It's the type of output you asked for. Right click on the exit tunnel of the for loop and select Create>Indicator.

Message Edited by Dennis Knutson on 10-11-2005 11:04 AM

0 Kudos
Message 10 of 15
(3,968 Views)