07-28-2012 11:29 AM
hi ,
i want read data from a table in a database then i want display 1 column in a listbox.
i read data from database but i can;t display it in a listbox.
anyone can help me plz?
Solved! Go to Solution.
07-28-2012 11:48 AM
Post the vi in 2009 or older format or the snippet of the code.
-Nilesh
07-28-2012 11:56 AM
07-28-2012 12:37 PM
You don't have a Listbox on the front panel. To populate a Listbox you need to write to the Listbox's ItemName property and write a 1D array of strings. To get your 1D array of strings you need to use the Database Variant to Data function to conver the variant you get from the database functions. Please review the examples that are installed with the Database Toolkit.
Notes on code:
I would also suggest that you review basic LabVIEW programming principles. To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.
07-28-2012 03:40 PM
ok thanks,it's helpfull
i change my code and there is some data displayed in the listbox.i want to display in the listbox the second column in the table that i attached its view as png file
but only the first value of the column is displayed
how i can display the other values?
07-29-2012 06:34 AM - edited 07-29-2012 06:39 AM
Your VI is way overcomplicated. If you're getting a 2D array and you just want the second column you only need to use Index Array to peel off the second column. That's it.
Again, your sequence structure is completely unnecessary.
I will reiterate my statement about spending some time with the LabVIEW tutorials.
07-30-2012 06:59 PM
thanks 🙂 all is ok