>The EXE contains tableX INCLUDED.
>The EXE also has a routine that can open this table.
>
>In a module (a seperate APP) that routine is called.
>After having called that routine, the table is indeed the current alias.
>The next step is a SQL-Select statement:
>
select * from tableX into cursor whatever
>However, tableX is not found, although it is even the currently selected alias.
>
>It is apparently the case that the SQL-Select code is trying to access the physical table, even though it is already open. It can't find the physical table and then tries to locate it in the current module (APP or EXE). It is not there and so it comes with a message.
In light of what Sergey said, why don't you change the alias to something different than table's name, and select from that alias? Or try some other trick (copy out the table, select from it into a readwrite nofilter cursor then close the table) - anything to sever the connection between the cursor you're selecting from, and the included table. SQL obviously can't pull records from a table included somewhere out there, but it should be capable of doing that from a RW cursor.