Interested in improving this site? Please check the To Do page.
sqlite.getColumnType
Retrieve the type of a column
Syntax
sqlite.getColumnType(queryID, columnNumber)
Params
queryID is the query ID returned by sqlite.compileQuery. columnNumber is the number of the column.
Returns
A Frontier type
Examples
compiledQuery = sqlite.compileQuery(db, "select * from cities");
result = sqlite.stepQuery(compiledQuery);
columnCount = sqlite.getColumnCount(compiledQuery);
dialog.alert(columnCount);
for i = 1 to columnCount {
result = sqlite.getColumn(compiledQuery, i);
columnName = sqlite.getColumnName(compiledQuery, i);
columnType = sqlite.getColumnType(compiledQuery, i);
dialog.alert(i + ": name=" + columnName + " type=" + columnType);
Notes
Remember that the first column is 1 in the Frontier routine sqlite.getColumnType but is a 0 in the original SQLite sqlite3_column_type function.