01-03-2011 06:06 AM - edited 01-03-2011 06:09 AM
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
Solved! Go to Solution.
01-03-2011 06:21 AM
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.....
01-03-2011 06:58 AM
Use "Item Names" property of the listbox. Connect output from database read vi to it.
01-03-2011 10:05 PM
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....
01-03-2011 10:13 PM
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.
01-03-2011 10:33 PM
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.
01-03-2011 10:47 PM
ya i get an error you have connected two arrays of different dimension
01-03-2011 10:53 PM
Thanks guys,,,,
multi column listbox solved my problem......
01-03-2011 11:00 PM
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.