>:-)
>Sure, but I know that this is completely new database that have nothing it it :-)
>But you are right, again.
>Someone else may want to use the code.
Your original version was correct for DB w/o views. Adding condition I suggested doesn't fix anything in case when views are presented. You would have to run first a loop to drop views and the second one to drop tables. I guess we both were right/wrong at some point. :)
On other hand if views are not schemabound, than underlying tables can be deleted w/o error and w/o deleting views first.
--sb--