Grigore,
Short of writing your own SQL command parser your solution is a good one. Make sure you are using a temporary DBC for this otherwise you are bloating your real DBC with these deleted views.
>I have one for today. Let's assume I have a working SQL command. I won't give it here, because I need a general way.
>
>Is it possible to know the .Tables property of that SQL command? It could be a SELECT field1, field2 FROm table, or SELECT * from table, or SELECT table1.field1, table2.field2 FROM table1 LEFT JOIN table2, an so on.
>
>How to extract the tables?
>
>Right now I am using a workaround - i create a view based on that synthax, get the tables from there, then delete the view. Is there a better way?