I am pretty confident I have formatted this correctly, as it's basically an exact duplicate of another statement I'm using (which works fine), but I'm getting an error stating
'(', ')' <column constraint> or comma expected, got 'TEXT'
and a red underline under 'TEXT' in line:
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_CONTROL_NUMBER + " TEXT NOT NULL, "
Like I said, I've got basically an exact duplicate of this statement working elsewhere.
Here's the one that does not work:
String sSQL;
sSQL = "CREATE TABLE " + RecentFileWaypointContract.TABLE_NAME + " ("
+ RecentFileWaypointContract.Columns._ID + " INTEGER PRIMARY KEY NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_CONTROL_NUMBER + " TEXT NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_INSURED_NAME + " TEXT NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_CUSTOMER + " TEXT NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_ADDRESS1 + " TEXT NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_ADDRESS2 + " TEXT, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_CITY + " TEXT NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_STATE + " TEXT NOT NULL, "
+ RecentFileWaypointContract.Columns.RECENT_FILE_WAYPOINT_ZIPCODE + " TEXT NOT NULL);";
db.execSQL(sSQL);
for comparison, here's the one that works just fine:
String sSQL;
sSQL = "CREATE TABLE " + UserWaypointContract.TABLE_NAME + " ("
+ UserWaypointContract.Columns._ID + " INTEGER PRIMARY KEY NOT NULL, "
+ UserWaypointContract.Columns.USER_WAYPOINT_TITLE + " TEXT NOT NULL, "
+ UserWaypointContract.Columns.USER_WAYPOINT_ADDRESS1 + " TEXT NOT NULL, "
+ UserWaypointContract.Columns.USER_WAYPOINT_ADDRESS2 + " TEXT, "
+ UserWaypointContract.Columns.USER_WAYPOINT_CITY + " TEXT NOT NULL, "
+ UserWaypointContract.Columns.USER_WAYPOINT_STATE + " TEXT NOT NULL, "
+ UserWaypointContract.Columns.USER_WAYPOINT_ZIPCODE + " TEXT NOT NULL);";
db.execSQL(sSQL);
(Also, there are in two different classes, so the use of sSQL in both places isnt the issue)
Any ideas?