how to display data from a database in a listboxes show in seperate fields.

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2009
Posts: 8
Reputation: siu17 is an unknown quantity at this point 
Solved Threads: 1
siu17's Avatar
siu17 siu17 is offline Offline
Newbie Poster

how to display data from a database in a listboxes show in seperate fields.

 
0
  #1
Jul 15th, 2009
Hi
I need the code in VB6 to display data from a database in a listbox
i tried the following code but its not working
Do While Not rec2.EOF
List1.ItemData(List6.NewIndex) = rec2.Fields(4)
rec2.MoveNext

' i even tried
Do While Not rec2.EOF
List1.ItemData rec2.Fields(4)
rec2.MoveNext
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 4
Reputation: jp26198926 is an unknown quantity at this point 
Solved Threads: 2
jp26198926 jp26198926 is offline Offline
Newbie Poster

Re: how to display data from a database in a listboxes show in seperate fields.

 
0
  #2
Jul 15th, 2009
Do While Not rec2.EOF
List1.AddItem rec2.Fields(4)
rec2.MoveNext
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC