Hello,

I'm trying to fetch data from database, my database contains UTF8
characters and when i'm doing so i get "SQLite3.Exception: database disk
image is malformed" in exception.
Getting SQLite3.Exception: database disk image is
malformed<http://stackoverflow.com/questions/21403632/getting-sqlite3-exception-database-disk-image-is-malformed>


Below is the code:

Please help me out


public ArrayList<String> getDefinations(String query, int column_index)
 {ArrayList<String> words = new ArrayList<String>();MatrixCursor mcursor = null;
 try {Stmt stmt = getDB2().prepare(query);if (stmt.step()) {
stmt.get_cursor().moveToFirst();
mcursor = stmt.get_cursor();try {
mcursor.moveToFirst();
 do {
 words.add(mcursor.getString(column_index));
   } while (mcursor.moveToNext());

 } catch (IndexOutOfBoundsException e) {
 if (MainActivity.logcat_status) {
 Log.e("Error", e + "");
  }
 }}
} catch (Exception e) {
    // TODO Auto-generated catch block
    if (MainActivity.logcat_status) {
     Log.e("Error", e + "");
       }

     }

This is the query which i'm using

select pos, definition, sample FROM word INNER JOIN sense ON
word.wordid = sense.wordid
 INNER JOIN synset ON sense.synsetid = synset.synsetid LEFT JOIN sample ON
 sample.synsetid = synset.synsetid WHERE lemma = 'life'


Thanks,

Ayush
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to