>Use two similar syntax:
>VFP
>
>SELECT TOP 1 Numero,CustomerName FROM News WHERE Priority ORDER BY 1 INTO CURSOR Temp
>
>SQL
>
>SQLEXEC(odbc,"SELECT TOP 1 Numero,CustomerName FROM News WHERE Priority ORDER BY 1","Temp")
I don't understand this answer as per my original message. The problem here is not to execute a SQLExec(). But, one SQL will create a cursor. Then, from that cursor we need to query another SQL on SQL Server with an inner join to get the rest of the fields. So, as the cursor created in VFP is not visible in the next SQLExec(), this is why I wanted to obtain an advise as to know how to achieve that in one SQLExec().