Getting schema.table for iosSQLiteDatabase

Hi

I’m trying to get the table schema from an iosSQLiteDatabase (DB). I’ve tried the following 2 methods - but both give me iosSQLiteExceptions:

dim sql as text = “PRAGMA schema.table_info(” + tableName + “)”
dim rs as iossqliterecordset = DB.SQLSelect(sql )

Error: Unknown database schema

dim sql as text = “PRAGMA schema.table_info(?)”
dim rs as iossqliterecordset = DB.SQLSelectEm(sql, tableName )

Error: near “?”: syntax error

Desktop version had db.tableschema and db.fieldschema so didn’t have to deal with this.

Got this version to work(ish) in the end…

dim sql as text = “PRAGMA table_info(” + tableName + “)”
dim rs as iossqliterecordset = DB.SQLSelect(sql )

This produces a record set with columns
0 = column no
1 = column name
2 = data type
3 = 0 - dunno
4 = default value - I think
5 = 0 - dunno

which you can access via rs.idxField(columnNo).