EPUB | CHM | PDF

TPSQLTable.Properties.TableID

Top Previous Next

Specifies the ID (oid) of the table associated with this table component.

Syntax:

property TableID: cardinal;

Description:

Use read-only TableID property to get unique integer value which identifies the table within database.

You can use TableID property for low level calls to server.

Example:

This example show SQL statement that returns number of user columns in the table

PSQLQuery1.SQL.Text := Format('SELECT relnatts FROM pg_class ' +
 'WHERE oid = ''%u''',
 [PSQLTable1.TableID]);

Since OID type is unsigned integer, be careful when mixing integer types in your application!