looping thru database results

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Aug 2006
Posts: 32
Reputation: StatiX is an unknown quantity at this point 
Solved Threads: 2
StatiX's Avatar
StatiX StatiX is offline Offline
Light Poster

looping thru database results

 
0
  #1
Oct 14th, 2007
Im trying to create a datagrid that will display an image instead of what is actually stored in the database. For instance if the result of a zodiac is leo, then show the leo image, or if it is cancer, show the cancer symbol, etc.. I am using a datagrid to show the results of the query but want to populate it with images instead of strings which is how they are stored in the database. Any ideas would be greatly appreciated or point me to a good tute on the subject. thanks
Always do what you wish you could..
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 121
Reputation: manal is an unknown quantity at this point 
Solved Threads: 17
manal's Avatar
manal manal is offline Offline
Junior Poster

Re: looping thru database results

 
0
  #2
Oct 16th, 2007
are you asking about how to loop thru database ? i think like this
  1. count = Me.DataSet.Table_Name.Count
  2. For i = 0 To count - 1
  3. m = Me.DataSet. Table_Name.Rows(i).Item("Column_name")
  4. Select Case m
  5. Case "Leo"
  6. Display image of Leo in Me.DataGrid1.Item(i, 0)
  7. .
  8. .
  9. .
  10. etc
  11.  
  12. End Select
"give only what u willing to receive "
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 32
Reputation: StatiX is an unknown quantity at this point 
Solved Threads: 2
StatiX's Avatar
StatiX StatiX is offline Offline
Light Poster

Re: looping thru database results

 
0
  #3
Oct 24th, 2007
Exactly what I needed.. Thanks!
Always do what you wish you could..
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