1

I m accessing SQLite databse from the following location/data/data/files/examples/search.sqlite it works fine in Samsung Tablet but when i run the same code in android 1.6 it throws the error.

06-23 09:06:24.996: ERROR/AndroidRuntime(221): java.lang.IllegalArgumentException: File /data/data/files/examples/search.sqlite contains a path separator

I was wonder why this error throws in android 1.6 not in samsung Galaxy tab i.e., android 2.2

  • Duplicate of http://stackoverflow.com/questions/5332328/sqliteopenhelper-problem-with-fully-qualified-db-path-name ? – THelper Jun 23 '11 at 11:27

1 Answers1

0

There is no /data/data/files/examples/ directory on any Android device that I am aware of. Please use a real directory, one that is actually possible. For example, getDatabasePath() will return a valid path to a SQLite database file.

Nightfirecat
  • 11,114
  • 6
  • 33
  • 50
CommonsWare
  • 954,112
  • 185
  • 2,315
  • 2,367