3 Replies Latest reply on May 21, 2009 6:48 AM by Blue Chrome

    Parameter or Filter

    Blue Chrome
      I am programming pages with ColdFusion/Microsoft SQL in Dreamweaver 8. On the page I am developing, I have bond information (recordset rs_BondMaint) and payments for those bonds (recordset rs_BondPaySchedule). I have the page set up so that it lists only one Bond at a time (at the top) and then lists all of the payments for that bond in a repeating region (at the bottom). The desired result is for the bond payments at the bottom to only include payments for the bond listed at the top (and when the user navigates to another bond, the payments also update). How do I connect the two (common field would be the bond ID number (Bond_ID))?
        • 1. Re: Parameter or Filter
          Level 7
          I hear good things about the book "Teach yourself SQL in 10 minutes" by
          Ben Forta.

          You are asking the a very foundational question in how RELATIONAL
          databases such as Microsoft SQL work. The part you will want to jump to
          is how to JOIN two or more table together on one or more common fields.

          Hint...

          You should not have two record sets, but rather one record set with the
          two parts related together.



          1 person found this helpful
          • 2. Re: Parameter or Filter
            Blue Chrome Level 1
            It's not that simple. Both recordsets are built from multiple table joins, but because of the layout it wouldn't do me much good to join them into one. I actually got the first record to output correctly using dynamic code in the SQL statement, but when you click to the next record, the subdata does not update. Is there any way to trigger the subdata to update when the main dataset changes? Full code attached:
            • 3. Re: Parameter or Filter
              Blue Chrome Level 1

              I solved the problem by using spry tabs with the bond information on one tab and the payment information on another tab.