Adam Schroder

Its Schotime.com!

January 2009 - Posts

Transforming one-to-many Sql into Nested Class

Back in the days of Classic ASP, when you had a one too many relationship displaying the data was pretty painful. You would do things like


var reference_number_old =
"$##%@"; while (recordsExist) { reference_number = String(rs(0)); if (reference_number_old != reference_number) { Response.Write(reference_number); reference_number_old = reference_number; } //Do more stuff }

Sooo very very painful, and that's only grouping by one column (reference number).

Now however with OO programming and the advance of Linq there is a much nicer and easier way to deal with this Master-Detail type one-to-many relationship.

Lets see how we do it now, still using our own custom sql.

Click Here to Keep Reading...

Cheers
Schotime

 

 

 

Posted: Jan 22 2009, 09:23 PM by schotime | with no comments
Filed under:
More Posts