Ok, this might be fine if you only ever getting one record in your answer set, however, I have found that the CursorAdapter fires the AfterCursorFill before the ALIAS is populated with the entire data set. Try using a the Base cursor adapter to pull down something like 1000 records from your dataset.
loCA = createobject("cursoradapter")
loca.datasourcetype = "ODBC"
loca.DataSource = SQLSTRINGCONNECT("YOUR STRING HERE")
loca.SelectCmd = "You select here that pulls down 1000 records"
loca.Alias = "Query"
loca.CursorFill()
Notice how you have command back. I can't figure this out. The only way to stop from getting command back is to put a RECCOUNT() in the AfterCursorFill event, so it waits until all the data is in the ALIAS.
I have tried setting SQLSETPROP(loca.DataSource, "Asynchronous",.f.) (returns .t.), but that didn't make a difference.
Howerver, if I use SQLSTRINGCONNECT() and SQLEXEC(), it waits unil the ALIAS is populate before returning control.
What am I missing???
Thanks
Mark Moore
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only