Skip to main content
September 16, 2008
Question

Parameter or Filter

  • September 16, 2008
  • 1 reply
  • 621 views
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))?
This topic has been closed for replies.

1 reply

Inspiring
September 16, 2008
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.



September 17, 2008
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:
May 21, 2009

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