drop table not deleting .tbl files

Post Reply
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

drop table not deleting .tbl files

Post 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
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

drop table not deleting .tbl files

Post 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).
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

drop table not deleting .tbl files

Post by John »

might a sqlcp cache close help?
John Turnbull
Thunderstone Software
barry.marcus
Posts: 288
Joined: Thu Nov 16, 2006 1:05 pm

drop table not deleting .tbl files

Post by barry.marcus »

Thanks, Kai! A judicious call to <sqlcp cache close> prior to the DROPs did the trick!
Post Reply