LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO DISPLAY AN ARRAY IN THE LISTBOX

Solved!
Go to solution

HI ALL,

 

I AM USING LABSQL..I AM ATTACHING AN EXAMPLE OF LABSQL...WHERE I CAN READ THE DATA FROM THE DATABASE...BUT IN THIS EXAMPLE THE SQL RESULTS WHICH I GET IN AN ARRAY,I WANT THE SAME TO BE DISPLAYED IN LIST BOX....HOW CAN I DO SO....

 

THNX IN ADVANCE,

SAKI

0 Kudos
Message 1 of 9
(4,456 Views)

i am attaching another VI with it now,,,,,,and this is the partly edited one of the above VI....

if at the output terminal of the subvi ADO SQL execute, an indicator is created...it shows data and its data type is also different from the example which is shipped with labsql

 

how can i change it to the previous one.....

0 Kudos
Message 2 of 9
(4,447 Views)

Use "Item Names" property of the listbox. Connect output from database read vi to it.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 3 of 9
(4,430 Views)

Hi gak..

 

Thanks for our reply....But I have tried that already..I connected the local variable of data to the property node item names of the list box...But its a broken arrow....So want some other method....

0 Kudos
Message 4 of 9
(4,389 Views)

If you have a broken run arrow, click on it to see what the error is.  Or hover over the broken wire and read the description.  It will give you an idea as to what's going on.  My guess is you have a string value being wired into the Item Names which is expecting an array of strings.

0 Kudos
Message 5 of 9
(4,385 Views)
Solution
Accepted by topic author saki

Hi saki,

Ravens Fan is right, try to figure out error on your own. I think you are using "Listbox" instead of" Multicolmn Listbox" .

Your data is 2D array, so you would need multicolumn listbox. You must be trying to connect it to the property node of "Listbox".

Try with multicolumn listbox. Smiley Happy

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 6 of 9
(4,374 Views)

ya i get an error you have connected two arrays of different dimension

 

 

0 Kudos
Message 7 of 9
(4,371 Views)

Thanks guys,,,,

 

multi column listbox solved my problem......

0 Kudos
Message 8 of 9
(4,365 Views)

Obviously, you cannot connect the 2D array from the query to a 1D listbox. You have not provided any information about the database query but you have already been told that you need to display multiple columns in a multicolmn listbox(or table). If your query returns a single column, then you just have to use the Index Array function on the 2D array before writing to the Listbox property node.

0 Kudos
Message 9 of 9
(4,360 Views)