View Single Post
  #2 (permalink)  
Old February 26th, 2009, 12:08 AM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The SQL Code is trivial really. Something like this would do:

sql Code:
SELECT
       m.Name,
       c.Comments
   FROM Members m
   INNER JOIN Comments c ON m.ID = c.MemberID
   WHERE c.CityID = @CityID

After executing this SQL you could simply populate a data table and then bind it to a gridview something like:

gridView1.DataSource = somedatatable;
gridView1.DataBind();


hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================