01-07-2015 08:36 AM
Hi,
Currently i am trying to display all data in one Column. i have a table inside a database.
the table consist of a fixed number of columns and unlimited rows (the number of rows is unlimited because the rows are going to be added manually later on. but this is not the main concern right now).
i can get the connection to the database. but i only be able to view all the columns headers (the title for the columns).
However, i need to get the data in one column only and display it in a list. i have tried search through the internet, but i can not get the answer or the concept of doing it. and one more thing, i need to use the list as control...
Below is the example of the table and i only need to display all data in the Col1. But i ended up displaying [Col1 Col2 Col3 Col4]....
Col 1 | Col 2 | Col 3 | Col 4 |
d1 | |||
d2 | |||
d3 | |||
… | |||
… | |||
dn |
here, i attached my vi... sry, i just started to use labview and no one around me has ever use labview. i am very thankfull if anyone can give me ideas and guide me...
thanks..
01-07-2015 08:43 AM
01-07-2015 08:54 AM
Hi Yamaeda,
I am sorry, but i dont get you..
I need to display the data in a list that will be used as a control.... what is the difference between using "List columns" andf "Get data"....?
01-07-2015 09:08 AM
01-07-2015 09:48 AM
Hi Dennis_Knutson:
thanks for reply....
I understand that it has to be related to the SQL command. But if you refer to the picture i attached below, could you show me where did i made mistake....?
i have tested the SQL command at the EXE block using mysql workbench, the result showed only the data in the recipe_name column.
for your information, recipe_name is the column i need. in the question i posted, i defined it as Col1 and the data needed to be displayed as a list is [d1, d2, d3, ... dn]
01-07-2015 10:00 AM
01-07-2015 10:27 AM - edited 01-07-2015 10:28 AM
There is a simpler way... I would suggest using the "DB Tools Select Data.vi" function instead. This function will return all data for a set of columns, or you can use the condition input to supply a sql-style query. Here is how this function will likely look with your database:
In the example finder, search for the LabVIEW Example "Connect to ACCDB Database.vi" for the reference code.
01-08-2015 01:11 AM
Hi Logan,
Thanks for the suggestion...
what i need is only one column to be displayed inside a list which will be used as a control... Below is the list box i wanted... the displayed items are the in the same column... i tried your method, but it can only display the first item "kebab"..... but the interface of the one you suggest is not like in the image attahced...
i did try the sql-style query, but nthing change..... anyway, what do you mean by the sql-style query? do i need to use "EXECUTE" block...?
Hi Dennis_Knutson;
The result of the fetch returns nothing (blank box)...
01-08-2015 01:28 AM
01-08-2015 03:43 AM