D
davidcoxmail
Got a simple, noob problem:
I need to call a display an MS Access db using ASP; I need to display
it by Organization and District Number (sort it twice).
Example:
Organization A, District 1
Name 1
Name 2...
Organization B, District 2
Name 3
Name 4...
I've tried a nested Loop statement that looks like this:
do until rs.EOF
Name=rs.fields("Name")
District=rs.fields("District")
IF District=rs.fields("District") then
IF OfficeSought=rs.fields("Name") then
Do while OfficeSought=rs.fields("OfficeSought")
<<code for displaying actual
records goes here>>
rs.MoveNext
loop
End IF
End IF
rs.MoveNext
loop
Instead of returning the data the way I want it to, it tends to only
get it "half-right" (i.e. not displaying all the records in my db, not
properly grouping all of them by District, etc.)
What changes would you recommend trying? Any help would be very much
appreciated (and please use noob-speak, as I am relatively new to the
world of database-driven web apps).
Thanks!
Cash
I need to call a display an MS Access db using ASP; I need to display
it by Organization and District Number (sort it twice).
Example:
Organization A, District 1
Name 1
Name 2...
Organization B, District 2
Name 3
Name 4...
I've tried a nested Loop statement that looks like this:
do until rs.EOF
Name=rs.fields("Name")
District=rs.fields("District")
IF District=rs.fields("District") then
IF OfficeSought=rs.fields("Name") then
Do while OfficeSought=rs.fields("OfficeSought")
<<code for displaying actual
records goes here>>
rs.MoveNext
loop
End IF
End IF
rs.MoveNext
loop
Instead of returning the data the way I want it to, it tends to only
get it "half-right" (i.e. not displaying all the records in my db, not
properly grouping all of them by District, etc.)
What changes would you recommend trying? Any help would be very much
appreciated (and please use noob-speak, as I am relatively new to the
world of database-driven web apps).
Thanks!
Cash