ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data from database to combo box

Solved!
Go to solution

Hi,

 

I am trying to figure out how to add information from a database to a combo box. I am reading two columns, the first is used as the Item and the second for the Value. There are multiple rows in the table, and I need an entry for each. It currently only adds one entry. The vi is attached.

 

Thanks,

Chris

0 Kudos
Message 1 of 5
(5,368 Views)

Hi CLH239,

 

I don't understand your question exactly.

 

Lets say your database fetch results with this 2D array :

 

2.jpg

 

What do you want to insert into the ComboBox Strings and Values ?

Do you use only one ComboBox ?

0 Kudos
Message 2 of 5
(5,342 Views)
Solution
Accepted by topic author CLH239

Hi again,

 

Attaching a VI... Is that what you mean ?

Message 3 of 5
(5,334 Views)

Hi Amitai,

 

Thanks for the reply. That was exactly what I was trying to do. I found a way to do it using a shift register (attached), yours is much simpler.

 

Thank you,

Chris

combo box.png

0 Kudos
Message 4 of 5
(5,320 Views)

Hi,

 

Notice that I have edited the VI Attached a few minutes after posting it....

 

What I attached at the first time was your VI exactly, just adding a For Loop and changed the wiring to correspond with the default wiring of the For Loop.

I am attaching the VI here again, so you can see that what you have done was correct, and you just needed a For Loop.

 

I have corrected the VI, to make it more simple.

 

You can see the differences between the VI attached now to yours (the original one) ,

using the VI Compare tool (Tools >> Compare >> Compare VI's)

(you will have to have both VI's opened before starting the tool)

0 Kudos
Message 5 of 5
(5,311 Views)