views:

82

answers:

0

I am requesting rows back from JDBC, and binding the values in objects through Flex/BlazeDS into an arraycollection.

If I ask twice in sucession, using the same function for the data, the second one invariably returns all the values,and binds them properly into an arraycollection. the first one doesn't return any rows, but doesnlt throiw an error either.

I believe that Flex is asynchronously moving forward, and when the original query runs for a second or two, flex bypasses it, returning no rows. The second, with the benefit of database caching, recovers all the data...

Surely there must be a way to make sure that the sql query has a chance to execute, pull back and bind the results...

Is there some formm of semphore or retrun logic that will allow me to make sure the Remote Object's query has fully completed, before moving forward?