AJ wrote:
> Here's the full onCreate() function. Seems like standard SQL syntax
> to me?
What was the error you got? You can get the error log from adb logcat or
DDMS. It should tell you what SQLite or Android did not like.
> public void onCreate(SQLiteDatabase db) {
> db.execSQL("CREATE TABLE IF NOT EXISTS "
> + DATABASE_TABLE_USER
> + " (userID INT PRIMARY KEY, name VARCHAR(40),"
There is no VARCHAR in SQLite.
http://www.sqlite.org/datatype3.html
> + " birthdate DATETIME,"
There is no DATETIME in SQLite.
> + " weight INT(3), heightInches INT, "
> + " smoking BOOLEAN DEFAULT 'FALSE',"
> + " school BOOLEAN DEFAULT 'FALSE', "
> + " reading BOOLEAN DEFAULT 'FALSE',"
> + " religion BOOLEAN DEFAULT 'FALSE',"
> + " dating BOOLEAN DEFAULT 'FALSE');");
There is no BOOLEAN in SQLite.
> db.execSQL("CREATE TABLE IF NOT EXISTS "
> + DATABASE_TABLE_ACH
> + " (achID INT PRIMARY KEY AUTO-INCREMENT, "
AUTOINCREMENT has no hyphen in SQLite.
http://www.sqlite.org/lang_createtable.html
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android App Developer Training: http://commonsware.com/training.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---