Local lnHandle lnHandle=Sqlstringconnect('DRIVER=SQL Server;'+; 'SERVER=servername;Trusted_connection=Yes;Database=Northwind') If lnHandle>0 lnOrderID = 0 * Get reccount SQLExec(lnHandle, ; "select rows from sysindexes"+; " where id=object_id('orders') and indid<2",'crsRecco') lnReccount = crsRecco.Rows SQLPrepare(lnHandle,"select top 100 * "+; "from Northwind.dbo.orders where orderID > ?lnOrderID"+; " order by OrderId",'crsResult') For ix = 1 To Ceiling(lnReccount/100) Wait Window Nowait ; Transform((ix-1)*100+1) + ' - ' + ; Transform(Min(ix*100,lnReccount)) + ; ' of '+Transform(lnReccount) SQLExec(lnHandle) Browse Go Bottom lnOrderID = OrderID Endfor SQLDisconnect(lnHandle) Endif ReturnCetin