I've tried using a bunch of different versions of ported SQLite libraries for C# on Windows Phone 7. I've got a SQLite file coming down from the innertubes and being stored correctly in IsolatedStorage (writing it as binary). The database opens fine but when I attempt to run a SELECT query on the file, it throws an exception of "malformed scheme (?)".
The data file itself is encoded for UTF8 but it appears that the row data i开发者_JAVA百科s being written as UTF16; the author of the DB file confirms that he uses text16 when writing the data out...
My guess is that because every C# library I've found has been compiled with SQLITE_OMIT_UTF16 turned on that I'm never going to be able to read data from this database and that's why I'm getting the schema exception in the first place.
Anyone have: - A better ideal as to what is wrong? - Knowledge of a WP7 SQLite library that supports UTF-16?
Thanks, Randy
When I try to run the select itself. When stepping through the SQLite code, it looks like it's choking when it's trying to get the columns from the master tables, but eventually fails when it tries to get the data... under the debugger, you can see the text coming back from the database calls as A\0B\0C\0 so it's defintely coming in as UTF-16 but being put into internal variables that are not ready for it.
精彩评论