본문 바로가기

카테고리 없음

Dbhelper Class In Java

Dbhelper class in java
  1. Dbhelper Class In Java

Returns the instance of this class associated with the database specified. Parameters: db - Database. Caches a set of features given the soup name. Parameters: soupName - features -. getCachedFeatures public java.util.List getCachedFeatures(java.lang.String soupName) Parameters: soupName - Returns: The set of features belonging to the given soup name. getCachedHasFTS public java.lang.Boolean getCachedHasFTS(java.lang.String soupName) Parameters: soupName - Returns:.

removeFromCache public void removeFromCache(java.lang.String soupName) Parameters: soupName -. getNextId public long getNextId(SQLiteDatabase db,java.lang.String tableName). If turned on, explain query plan is run before executing a query and stored in lastExplainQueryPlanand also get logged Parameters: captureExplainQueryPlan - true to turn capture on and false to turn off.

Dbhelper class in java

getLastExplainQueryPlan public JSONObject getLastExplainQueryPlan Returns: explain query plan for last query run (if captureExplainQueryPlan is true). getSoupTableNameFromDb protected java.lang.String getSoupTableNameFromDb(SQLiteDatabase db,java.lang.String soupName). safeClose protected void safeClose(Cursor cursor) Parameters: cursor.

Dbhelper Class In Java

Your CREATE TABLE has syntax problems: public static final String SCRIPT='CREATE TABLE' + TABLENAMESAVE + '(' + 'id INTEGER PRIMARY KEY AUTOINCREMENT,'+'surl TEXT NOT NULL, suid TEXT NOT NULL, spassword TEXT NOT NULL);';You need space between TABLE and the name, like this: public static final String SCRIPT='CREATE TABLE ' + TABLENAMESAVE + '(' + 'id INTEGER PRIMARY KEY AUTOINCREMENT,'+'surl TEXT NOT NULL, suid TEXT NOT NULL, spassword TEXT NOT NULL);';You should not be catching exceptions in onCreate. When sqlite helper onCreate returns successfully, the framework thinks everything is all right and the tables got set up.After fixing onCreate as above, uninstall your app so that onCreate gets called again.