Recursion>>Just me pounding my DB again.

Results 1 to 5 of 5

Thread: Recursion>>Just me pounding my DB again.

  1. #1

    Default Recursion>>Just me pounding my DB again.

    I started to write my own messageboard, nothing big, but I wanted it fully<BR>threaded (view all messages and replys at once). I see this all the time in<BR>perl, but very rare in ASP. Anyways, the only way I came up with for<BR>solving my problem is to use recursion and pound the HECK out of the Db for<BR>a fully threaded messageboard.<BR><BR>What I am looking for is:<BR>Message 1<BR>...Reply to mess 1 (2)<BR>...Reply to mess 1 (3)<BR>......Reply to mess 3 (4)<BR>...Reply to mess 1 (5)<BR>Message 6<BR><BR>That&#039s the idea, I thought it would be simple, was I way wrong. I almost<BR>have to take each record out one at a time (lots of recordsets). Sure there<BR>are lots of boards out there, but very few using this style. I have come<BR>across many that will list the topic and the number of replys for that<BR>topic. The boards that do have this feature use an object,<BR>which of course requires you to register it on the server (student=no_money). Anyone got an<BR>answer on how to do this without beating up the db? I came across a few post in some ASP news groups with the same question, but quickly died after the usual replys of "just use ORDER BY in your SQL statement". Is perl where its at using recursion? <BR><BR>Thanks,<BR>DRUG_DEALER<BR>

  2. #2
    Jairo Guest

    Default RE: Recursion>>Just me pounding my DB ag

    ASP_DRUG_DEALER,<BR>I use a SQL Server stored procedure to handle the recursion, so it isn&#039t that bad. I&#039ll let you know what the performance is like when I get a lot more users online.<BR><BR>What you&#039re looking for - it can be done in ASP. Try the stored procedure route. You can also check out the performance yourself at<BR>At some point, I&#039ll add more features, but for now, it meets my needs.<BR><BR>HTH,<BR>Jairo<BR>

  3. #3

    Default RE: Recursion>>Just me pounding my DB ag

    Jairo,<BR><BR>Yea, thats what I am looking for. Are you sending a parameter back for each message? e.g. Parent=2&#062;fire off stored procedure&#062;get results&#062;do it again (round trip for each message). Or are you doing something like forum ID=2&#062;fire off stored procedure&#062;return the whole thread? I am still pretty new to stored procedures. If you dont mind I would love to see that procedure if your returning the whole recordset for the thread at once...Thats KILLER! <BR><BR>Thanks again,<BR>DRUG_DEALER

  4. #4
    Jairo Guest

    Default RE: Recursion>>Just me pounding my DB ag

    ASP_DRUG_DEALER,<BR>You are the man around here!<BR>Anyway, I&#039ll throw you a bone - check out the SQL Server Books-On-Line - and do a search on "Expanding Networks".<BR>I am doing something like Forum ID = 2, which then returns all the messages I&#039m after.<BR><BR>Once you&#039ve got that, you should be on your way.<BR><BR>HTH,<BR>Jairo<BR><BR>

  5. #5

    Default Jario<<YOU THE MAN!!

    I found it. Thanks a ton. I really was going nuts over this one.<BR><BR>Next stop&#062;&#062;A home grown component using my NEW super special stored procedure, thanks to you. WOW, what a high!<BR><BR>Thanks again,<BR>DRUG_DEALER

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts