Question:
I've got paradox tables with indexes and secondairy indexes, in other words not just the *.db file. I would like to rename and possibly delete the table, not just the *.db file, but the whole lot. How do I do that ?
looks like useful tips, but I haven't used queries nor SQl-statements before, so this is not enough information for me to put it in practice. Is there any other way withoud the use of queries to rename / delete tables ?
You may think that SQL and Query type components a bit scary at first but they are well worth the effort in mastering.
Eventually, you should find them easier and more powerful than using TTable type components.
As an example, this is how you could use TQuery to drop the Paradox table (indexes and all). This procedure, DropTable takes the name of the database containing the table and the name of the table as parameters.
Code:
procedure DropTable ( const dbname, table: string );
begin
with TQuery.Create (nil) do try
DatabaseName := dbname;
SQL.Add ( 'DROP TABLE ' + table );
ExecSQL;
finally
free;
end;
end;
I haven't tested the above code so there may be some typos.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.