Hi Joerg,

Plenert, Joerg wrote:

Hi !

I need a possibility to get the table name
(actual and/or original) from a column.

There is a function sqlite3_column_name that
returns the name of the column.
How about a function sqlite3_column_tablename that returns the tablename ?


I need that function to check user rights on
the data returned by sqlite.


Column names are always local to a table, i.e., tables form orthogonal/independent name spaces with respect to column names. This means that the same column name can be used in several different tables.

So clearly you are not asking "for any given column name, show me the table from which it came": This is not a one-to-one mapping, but a one-to-many mapping.

In what circumstances do you know the column name but not the table name? Please elaborate.

Regards,

Ulrik P.

--
Ulrik Petersen, MA, B.Sc.
University of Aalborg, Denmark




Reply via email to