Page 1 of 1

drop table not deleting .tbl files

Posted: Thu Jun 30, 2011 12:30 pm
by barry.marcus
In my code there is a DROP TABLE statement inside of a loop. When it runs, the tables are dropped (i.e., afterward they are no longer in the SYSTABLES table) but the underlying .tbl files are not deleted. When I issue the same DROP TABLE statements from the TSQL prompt, the files *are* deleted.

I thought that perhaps it's a permissions issue, but the user under which the code runs has "Full Control" permissions in the directory where the .tbl files reside.

Any ideas what I might be missing?

Thanks

drop table not deleting .tbl files

Posted: Thu Jun 30, 2011 12:43 pm
by Kai
If this is Windows, then another file handle to the .tbl is probably still open, either from another Texis process, or the same one that DROPped it (e.g. a cached handle from the same or previous statement).

drop table not deleting .tbl files

Posted: Thu Jun 30, 2011 12:58 pm
by John
might a sqlcp cache close help?

drop table not deleting .tbl files

Posted: Thu Jun 30, 2011 1:34 pm
by barry.marcus
Thanks, Kai! A judicious call to <sqlcp cache close> prior to the DROPs did the trick!