Best unofficial Apache Server developers community |
|
I am trying to open a SQLite database in android, the database works fine in the sqlite browser, but android does not read that the table in question exists. Below is the code I'm tinkering with.
I have found many articles regarding this issue on several forums (including stackoverflow) but the issue I'm having didn't seem to get resolved with their solutions. I'm trying to pull the RGB and colorname from the code (the query above is just a test leading up to that) so that I can estimate the nearest RGB using the euclidean distance formula on each portion. In order to do that, I need to be able to atleast grab the data from the table :P. LogCat:
And finally, here's a picture of the SQLite browser showing that the query does work on that database 1.us/img844/6327/screenshot2011062509122.png" rel="nofollow" target="_blank">SQLiteBrowser Query Incase the picture didn't give it away, I'm storing the colors.db in assets. Sorry for the length, I try to be as thorough as possible and seriously appreciate anyone who helps me.
posted via StackOverflow
|
|
 
|
From your screenshot it appears you have the colors.db in your assets directory. While I am not sure exactly how to load a SQLite db from there, I do know that by default the I'm sure someone else or a little googling can help resolve this further. |
|
 
|
You are creating the database and after that you wish to access the table from it. Don't you need to create the tables too? I'd suggest you to use SQLiteOpenHelper instead of |