Cursor not working on Tablet (working right on emulator)
<p>let's see if anybody can help me:<br>
I'm working with sqlite, so I've created a helper:</p>

<pre><code>public class Basedatos extends SQLiteOpenHelper{

private static String DB_PATH = "/data/data/aria.globalaplicaciones/databases/";
private static String DB_NAME = "Aria.sqlite"; 
private SQLiteDatabase myDataBase; 
private final Context myContext;
public static final String KEY_ID = "_id";

public Basedatos(Context context) {
   super(context, DB_NAME, null, 1);
   this.myContext = context;
</code></pre>

<p>}</p>

<pre><code>private boolean checkDataBase(){
     SQLiteDatabase checkDB = null;
     try{ 
          String myPath = DB_PATH + DB_NAME;
          checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);

     }catch(SQLiteException e){ 
     }
     if(checkDB != null){
          checkDB.close();
     }
     return checkDB != null ? true : false;
}
private void copyDataBase() throws IOException{
     InputStream myInput = myContext.getAssets().open(DB_NAME);    
     String outFileName = DB_PATH + DB_NAME;
     OutputStream myOutput = new FileOutputStream(outFileName);
     byte[] buffer = new byte[1024];
     int length;
     while ((length = myInput.read(buffer))&gt;0){
          myOutput.write(buffer, 0, length);
     }

     myOutput.flush();
     myOutput.close();
     myInput.close();
}
public void createDataBase() throws IOException{ 
     boolean dbExist = checkDataBase();

     if(dbExist){
     }else{
          this.getReadableDatabase();

          try { 
               copyDataBase(); 
          }catch (IOException e) {
               throw new Error("Error copiando Base de Datos");
          }
     }
}
 public void open() throws SQLException{ 
     if(myDataBase==null || (!(myDataBase.isOpen())) ){ 
     try {
          createDataBase();  
     } catch (IOException e) {
          throw new Error("Ha sido imposible crear la Base de Datos");
     }
          String myPath = DB_PATH + DB_NAME;
          myDataBase = SQLiteDatabase.openDatabase(myPath, null,SQLiteDatabase.OPEN_READONLY);
     }
 }


 public void close(){
     myDataBase.close(); 
 }

@Override
public void onCreate(SQLiteDatabase db) {
    // TODO Auto-generated method stub

}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    // TODO Auto-generated method stub

}
public Cursor obtenerRespuesta(){
    Cursor cursor = myDataBase.rawQuery("select codigoPrenda from datos", null);        
    return cursor; 
}

}
</code></pre>

<p>And this is my main class:(onCreate)</p>

<pre><code>Basedatos bd = new Basedatos(this);
    try {
        bd.createDataBase();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    bd.open();

    Cursor cursor = bd.obtenerRespuesta();
    cursor.close();

    bd.close();
</code></pre>

<p>It works perfectly on emulator but it crashes when I try to create the Cursor on real Tablet.<br>
(Here it crashes):</p>

<pre><code>Cursor cursor = bd.obtenerRespuesta();
cursor.close();
</code></pre>

<p>I hope some of you can give me a hint.<br>
Thanxs so much </p>

<hr>

<p>Actually emulator was 4.1 and now with emulator 4.0 I'm having also a problem.
That's what I'm getting on LogCat:<br>
    11-26 10:29:47.316: I/SqliteDatabaseCpp(813): sqlite returned: error code = 1, msg = no such         table: datos, db=/data/data/aria.globalaplicaciones/databases/Aria.sqlite
11-26 10:29:47.316: D/AndroidRuntime(813): Shutting down VM
11-26 10:29:47.316: W/dalvikvm(813): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
11-26 10:29:47.336: E/AndroidRuntime(813): FATAL EXCEPTION: main
11-26 10:29:47.336: E/AndroidRuntime(813): java.lang.RuntimeException: Unable to start activity ComponentInfo{aria.globalaplicaciones/aria.globalaplicaciones.EleccionActivity}: android.database.sqlite.SQLiteException: no such table: datos: , while compiling: SELECT codigoPrenda FROM datos
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.ActivityThread.access$600(ActivityThread.java:122)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.os.Looper.loop(Looper.java:137)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.ActivityThread.main(ActivityThread.java:4340)
11-26 10:29:47.336: E/AndroidRuntime(813):  at java.lang.reflect.Method.invokeNative(Native Method)
11-26 10:29:47.336: E/AndroidRuntime(813):  at java.lang.reflect.Method.invoke(Method.java:511)
11-26 10:29:47.336: E/AndroidRuntime(813):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-26 10:29:47.336: E/AndroidRuntime(813):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-26 10:29:47.336: E/AndroidRuntime(813):  at dalvik.system.NativeStart.main(Native Method)
11-26 10:29:47.336: E/AndroidRuntime(813): Caused by: android.database.sqlite.SQLiteException: no such table: datos: , while compiling: SELECT codigoPrenda FROM datos
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteCompiledSql.(SQLiteCompiledSql.java:64)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:127)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:94)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:53)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1564)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1449)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1405)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1485)
11-26 10:29:47.336: E/AndroidRuntime(813):  at aria.globalaplicaciones.Basedatos.obtenerRespuesta(Basedatos.java:137)
11-26 10:29:47.336: E/AndroidRuntime(813):  at aria.globalaplicaciones.EleccionActivity.onCreate(EleccionActivity.java:78)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.Activity.performCreate(Activity.java:4465)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
11-26 10:29:47.336: E/AndroidRuntime(813):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
11-26 10:29:47.336: E/AndroidRuntime(813):  ... 11 more</p>
