English | Site Directory

Android - An Open Handset Alliance Project

android.database.sqlite.SQLiteStatement

java.lang.Object
android.database.sqlite.SQLiteProgram SQLiteClosable
android.database.sqlite.SQLiteStatement

A pre-compiled statement against a SQLiteDatabase that can be reused. The statement cannot return multiple rows, but 1x1 result sets are allowed.

Summary

Fields inherited from class android.database.sqlite.SQLiteProgram

Public Methods

        void  execute()
Execute this SQL statment, if it is not a query.
        long  simpleQueryForLong()
Execute a statement that returns a 1 by 1 table with a numeric value.
        String  simpleQueryForString()
Execute a statement that returns a 1 by 1 table with a text value.
Methods inherited from class android.database.sqlite.SQLiteProgram
Methods inherited from class java.lang.Object
Methods inherited from interface android.database.sqlite.SQLiteClosable

Details

Public Methods

public void execute()

Execute this SQL statment, if it is not a query. For example, CREATE TABLE, DELTE, INSERT, etc.

Throws

SQLException If the SQL string is invalid for some reason

public long simpleQueryForLong()

Execute a statement that returns a 1 by 1 table with a numeric value. For example, SELECT COUNT(*) FROM table;

Returns

  • The result of the query.

public String simpleQueryForString()

Execute a statement that returns a 1 by 1 table with a text value. For example, SELECT COUNT(*) FROM table;

Returns

  • The result of the query.
Build m5-rc15i - 10 Jun 2008 13:54