943,548 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 1716
  • VB.NET RSS
Oct 14th, 2007
0

looping thru database results

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 2
Light Poster
StatiX is offline Offline
32 posts
since Aug 2006
Oct 16th, 2007
0

Re: looping thru database results

are you asking about how to loop thru database ? i think like this
VB.NET Syntax (Toggle Plain Text)
  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
Reputation Points: 37
Solved Threads: 17
Junior Poster
manal is offline Offline
122 posts
since Mar 2006
Oct 24th, 2007
0

Re: looping thru database results

Exactly what I needed.. Thanks!
Reputation Points: 10
Solved Threads: 2
Light Poster
StatiX is offline Offline
32 posts
since Aug 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: some provide me interface
Next Thread in VB.NET Forum Timeline: Help Needed With OOP Bank Account..VB.Net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC