944,134 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1030
  • ASP.NET RSS
Nov 6th, 2007
0

Big Repeater Question for you all

Expand Post »
I have a page that a client asked me to make that consists of the following:
ASP.NET Syntax (Toggle Plain Text)
  1. Repeater1 (Client Data)
  2. Label1 = Number of Records
  3. Repeater2 (More data where ClientID supplied = ClientID on the table) (Limit 4 recs)
  4. Label2 = Number of Records
  5. Repeater3 (More data where ClientID supplied = ClientID on the table) (limit 12 recs)
  6. Label3 = Number of Records
  7. Repeater4 (More data where ClientID supplied = ClientID on the table) (limit 25 recs)
  8. end repeater
How would you suggest I handle this to eliminate 4 separate queries hitting the database? This is all expecting that I will use the following queries based upon the situation above:
Repeater1 = "SELECT *, (SELECT COUNT(ID) FROM Table1) As Count1, (SELECT COUNT(ID) FROM Table2) As Count2, (SELECT COUNT(ID) FROM Table3) As Count3, FROM Table4 WHERE ID=ID"

How would you suggest I tap the other repeaters along with the first, if it is possible? Please give me suggestions.. should I use a DataSet or just a DataReader? Anything will help. Thank you.
Last edited by SheSaidImaPregy; Nov 6th, 2007 at 5:38 pm.
Similar Threads
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007
Nov 6th, 2007
0

Re: Big Repeater Question for you all

Nevermind, I resolved it. By including many select statements in one, I can then use the "with" statement and bind the rest that way. Thanks anyway!
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007
Nov 7th, 2007
0

Re: Big Repeater Question for you all

Nevermind... as I thought I solved it, my data provider does not allow multiple queries (Odbc). Any suggestions in combining these queries above? The only thing common they share are the User's ID. I am horrible at creating MySQL queries that are joined or unioned with other selects. Thanks.
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007

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 ASP.NET Forum Timeline: plz solve my problem of master pages
Next Thread in ASP.NET Forum Timeline: background-color:"9E0039" works in IE but not mozilla, solution?





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


Follow us on Twitter


© 2011 DaniWeb® LLC