views:

1557

answers:

3

Hi,

we are trying to develop an application on android we are using SQLite Database and on phone we are getting SQLiteException:no such table. but, it is working fine on simulator.

Can anyone provide any input on this?

A: 

Have you run your code on a clean emulator? Have you also verified that the code that creates the table is getting executed? The next step would be to get the sqlite db off the emualtor and look at it using a sqlite database browser to check that the table does actually exist.

hacken
Hi! I have already created a database and just using the already created database's, so the table's are already created. I am just doing the SELECT on the existing table. My concern is it is working fine on simulator and not on phone
MySQL DBA
Have you verified that the table is there? It is a lot more likely that the table isn't there on the phone than select not working. Again it is very easy to verify that you DB was created correctly.
hacken
A: 

If you don't specify the database file name correctly I believe it falls back to creating an empty database. This is generally the cause of 'table not found'. Check your path and database file name.

Jay