UPDATE: I fixed it. I had a typo in the create statement. I accidentally
added a bracket after on of the floats.

On Sat, Jul 9, 2011 at 12:17 PM, Raghav Sood <[email protected]> wrote:

> Hi all,
>
> I am creating a database to store the list of earthquakes as an update to
> my existing app.
>
> I am receiving an error with the following caused by statement:
> Caused by: android.database.sqlite.SQLiteException: near ",": syntax error:
> create table earthquakes (_id integer primary key autoincrement, date
> INTEGER, details TEXT, latitude FLOAT, longitude FLOAT, magnitude FLOAT),
> link TEXT);
>  My SQL statement is:
>
> private static class earthquakeDatabaseHelper extends SQLiteOpenHelper {
>
>     private static final String DATABASE_CREATE =
>
>       "create table " + EARTHQUAKE_TABLE + " ("
>
>       + KEY_ID + " integer primary key autoincrement, "
>
>       + KEY_DATE + " INTEGER, "
>
>       + KEY_DETAILS + " TEXT, "
>
>       + KEY_LOCATION_LAT + " FLOAT, "
>
>       + KEY_LOCATION_LNG + " FLOAT, "
>
>       + KEY_MAGNITUDE + " FLOAT), "
>
>       + KEY_LINK + " TEXT);";
>
>
> As far as I can see the statement is fine. Please help.
>
>
> Thanks
>
> --
> Raghav Sood
> http://www.raghavsood.com/
> http://wiki.androidappcheck.com/
> http://www.telstop.tel/
> https://market.android.com/developer?pub=Raghav+Sood
>
>


-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to