>The problem isn't referencing....
>
>If I open a table:
>
>select 0
>use table.dbf
>
>and it gets opened in area 1, and then use the sqlexec command to open a remote table, it closes the table I've opened in area 1 and puts the cursor from the sqlexec there...
It'll happens only if you specify the alias from the workarea 1 as the third parameter of SQLSEXEC(). Otherwise SQLEXEC() doesn't close any other tables or cursors and creates a cursor in the first free work area.
--sb--