Page 1 of 1

How to find out if a table is a system table

Posted: Fri 08 Sep 2006 02:16
by jaska45
Hi,

TMsConnection.GetTableNames returns names of all tables in the database including the system tables (e.g. sysdiagrams).
How can I figure out what tables are system tables and what are normal tables?

Best regards,
Jaakko

Posted: Mon 11 Sep 2006 13:08
by Jackson
TCustomDAConnection.GetTableNames returns only user tables. sysdiagrams table appears in the list because it is marked as user table. You can make sure of this by executing the following statement: SELECT name, xtype FROM sysobjects WHERE name = 'sysdiagrams'

Posted: Mon 11 Sep 2006 13:25
by jaska45
Thanks. However when I use Microsoft SQL Server Managerment Studio it shows that sysdiagams is a system table.

Best regards,
Jaakko

Posted: Tue 12 Sep 2006 13:51
by Jackson
You are right. Microsoft SQL Server Management Studio shows sysdiagams as a system table.
Evidently this is peculiarity of Management Studio behaviour.