Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor Adaptor open order

Status
Not open for further replies.

AlastairP

Technical User
Feb 8, 2011
286
AU
Is there a way to control the order in which cursor adaptors open in the Data Environment?
 
As far as I know there is nothing, that would compare to the tab order of controls. I assume the de opens them in the order they where added to the DE.

You could nevertheless query in the order you want, by putting NODEFAULT into the AutoOpen() method of the CAs you don't want to load initially and then call their CursorFill() later, eg in form Init().

Or you set Nodata=.T. on those CAs and then get an empty cursor you can simply requery by REQUERY(cAlias), which implictly calls CursorFill().

That combined with the BindControls Form property set to .F. until you have all your data is the easiest to have full control about the order of loading the CAs, set Thisorm.BindControls = .T. at the end of the form Init() and you'll be fine.

Bye, Olaf.
 
Additional info: I had in mind Requery(cAlias) does implicitly call the CA.Cursorfill() method, as TABLEUPDATE(cAlias) also works independant of the CA object.

I haven't tried if that works or fails indeed, but came across another helpful function, that would make it work anyway: GETCURSORADAPTER( cAlias ) returns the CA object used to generate the cursor, so even if REQUERY(cAlias) fails, you can use o = GETCURSORADAPTER(cAlias) and then set o.NoData=.F. and do o.CursoFill() or o.CursorRefresh().

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top