Interested in improving this site? Please check the To Do page.

Back to SQLite Verbs

sqlite.clearQuery

Clear an SQLite query from memory

Syntax

sqlite.clearQuery(queryID)

Params

queryID is the query ID returned by sqlite.compileQuery.

Returns

An SQLite result code.

Examples

on createTable () {
	local (db, query, compiledQuery);
	db = sqlite.open("C:\\temp\\testdatabase.db3");
	bundle { // the create table query
		query = "CREATE TABLE [verbs] (" + cr;
		query = query + "  [ID] INTEGER," + cr;
		query = query + "  [category] TEXT COLLATE NOCASE," + cr;
		query = query + "  [verbname] TEXT COLLATE NOCASE)" + cr};
	compiledQuery = sqlite.compileQuery(db, query);
	result = sqlite.stepQuery(compiledQuery);
	result = sqlite.clearQuery(compiledQuery);
	sqlite.close(db)}

Notes

sqlite.clearQuery is different from sqlite.resetQuery. sqlite.clearQuery removes the query from memory, while sqlite.resetQuery does what it says: it resets the query, still in memory, so when you execute your next sqlite.stepQuery, you start from the top once again.

See Also


Personal Tools