Using SQL to filling a listbox 
Author Message
 Using SQL to filling a listbox

Hi,
I want use a listbox to make query to a database. The database
consists of table FRIENDS with such fields like f.e. "name",
"surname", "address", "age" and so on.
With query "SELECT DISTINCT Friends.Name FROM Friends" I can get
unique names that should be included in the listbox. When new name
will be added to the table, the listbox should be updated as well.
My problem is that result of "SELECT DISTINCT" query is a 2D array
that is not accepted by listbox.
Can somebody help me, please?


Sun, 31 Oct 2004 03:17:26 GMT  
 Using SQL to filling a listbox
Wacek,

Use a MultiColumn Listbox, then create a property node of the MultiColumn
Listbox on the wiring diagram. Change the property node to "write" type and
then select property "ItemNames".  Wire your 2d string array to this
property node. Should do it.

Hope this helps.

Jim


Quote:
> Hi,
> I want use a listbox to make query to a database. The database
> consists of table FRIENDS with such fields like f.e. "name",
> "surname", "address", "age" and so on.
> With query "SELECT DISTINCT Friends.Name FROM Friends" I can get
> unique names that should be included in the listbox. When new name
> will be added to the table, the listbox should be updated as well.
> My problem is that result of "SELECT DISTINCT" query is a 2D array
> that is not accepted by listbox.
> Can somebody help me, please?



Sun, 31 Oct 2004 06:52:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Filling listbox with data from Text or Excel file

2. Filling listbox via proc

3. Filling listbox from file.

4. Filling a ListBox from C code

5. Ms SQL fileerror 22001=String data, right truncation when I fill data into file

6. data to sql server using labview and labview sql toolkit

7. how to access SQL server using SQL toolkit from LabVIEW

8. Using SQL Anywhere (Watcom SQL 5.0) with REXX

9. Using SQL Anywhere (Watcom SQL 5.0) with REXX

10. SQL query results to listbox, but 1 string is too long

11. Using expand and filling rows and columns with sums

12. Filling And Using Arrays

 

 
Powered by phpBB® Forum Software