> gSQLDataSource = "xxxxxx" > gSQLUserId = "xxxxxx" > gSQLPassword = "xxxxxx" > > gSQLHandle = SqlConnect (gSQLDataSource, gSQLUserId, gSQLPassword) > > If gSQLHandle = -1 > aError (SqlErrorTab) > MessageBox ("Erro " + Transform (SqlErrorTab [1], "@L 9999") + ", message: " + AllTrim (SqlErrorTab [2])) > Return > endif > > CursorSetProp("FetchAsNeeded",.T., 0) > CursorSetProp("FetchSize" ,300, 0) > > SQLSetProp (gSQLHandle,"Asynchronous", .T.) > > Do While not Used ("MyResult") && SQLEXEC() will return 0 till all records returned. > && When you want to fetch, just wait till alias created with > && first FetchSize number of records (300 in this sample) > > SQLExec (gSQLHandle,"Select * From proddta.f0911", "MyResult") > enddo > > Browse > > SqlCancel (gSQLHandle) > SqlDisconnect (gSQLHandle) > > If Used ("MyResult") > Use In MyResult > endif > >