2 Replies Latest reply on Jun 23, 2008 4:26 AM by flexchief

    SQL for loop problem

    flexchief Level 1

      I have a series of sql statements I need to execute one after another so I set up a for loop to handle this. For some reason the loop seems to only execute for the last item in the loop?

      Below is a snippet of my code. Any help would as always be hugely appreciated ;-)
        • 1. Re: SQL for loop problem
          Min Man
          I know this is only a snippet of code....but are you doing anything with the results before the next iteration of the for loop? If you are only handling the results after the for loop, then the prior genre queries will be executed....but you will only be handling the results of the last executed query. I would expect to see a handling/processing of the result set inside the FOR loop.
          • 2. SQL for loop problem
            flexchief Level 1
            Sorry my bad, I tried to cut the code down to just what I thought was necessary for the loop. Below is a more detailed version of my code to help.


            new2jukeArtistNamesHolder, new2jukeTrackNamesHolder, new2jukeTrackPathsHolder & new2jukeArtistImagesHolder are all ArrayCollections declared within my mxml code for the app.

            initJukebox() gets called when my app loads.

            As always any help is greatly appreciated!