>yes, that's not the problem because I leave only the dynamic query and in any case return timeout
Put SET NOCOUNT ON at the beginning of the SP.
Then run SQL Server Profiler and check what VFP sends to SQL Server.
Copy it and execute it in SSMS.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.