In Honeycomb, using bindargs for 'Attach' sql statement doesn't seem
to work.
try this instead
db.execSQL("attach database '" + newDb + "' as newDb");
this should work.
files a bug to address this. thanks for posting this question. (also
answered this question on
http://stackoverflow.com/questions/5108964/attached-databases-in-honeycomb.
again thanks for the pointer)
On Mar 14, 3:04 am, Mark Carter <[email protected]> wrote:
> My app makes extensive use of this:
>
> sqldb.execSQL("ATTACH DATABASE ? AS mydb", new String[] { dbFile.getPath()
>
> });
>
> where the dbFile is stored on External Storage.
>
> The Honeycomb emulator confirms the File.exists() but when I query the
> database, it's as if the database hasn't been attached at all.
>
> Also SQLiteDatabase.getAttachedDbs() only returns <"main", ":memory:"> -
> i.e. a single-item list.
>
> The code works fine in 1.5 through to 2.3.
>
> And I'm not the only one experiencing
> this:http://stackoverflow.com/questions/5108964/attached-databases-in-hone...
--
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