Hi Kirk,

On Oct 5, 2004, at 21:10, Kirk Haines wrote:

But is there a way to get the name of that field?

1) I obtain the SQL statement that generated the table in the first place with something like this:


SELECT sql FROM sqlite_master WHERE tbl_name = 'test';

2) The above statement returns something like:

CREATE TABLE test(ROWID INTEGER PRIMARY KEY,testString QLString,testNumber QLNumber,testBoolean QLBoolean,testDateTime QLDateTime,testContainer QLContainer)

3) Then I parse the CREATE TABLE... statement and separate columns from datatypes.

You can look for INTEGER PRIMARY KEY. Would that work for you?

-- Tito



Reply via email to