title: android sqlite no such table error (code 1)
body: <p>when I press the button for list database items I get this error. where is my fault? ( when I look DDMS I see <strong>exDB</strong> file in device storage ??)</p>
  
  <p><a href="https://i.stack.imgur.com/lJK71.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lJK71.png" alt="exDB fields"></a></p>
  
  <p><a href="https://i.stack.imgur.com/aFtvF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFtvF.png" alt="enter image description here"></a></p>
  
  <p>VT_baglanti3 class</p>
  
  <pre><code>public class VT_baglanti3 extends SQLiteOpenHelper {
  
    // DataBase oluşturma
    private static final String VT="exDB"; // veri tabanı adi
    private static final Integer SURUM=1;  // veri tabanı sürümü
  
    public VT_baglanti3(Context c) {
      super(c, VT, null, SURUM); // yukarıda tanımlanan değişkenleri parametre olarak verdik.
  
    }
  
    @Override
    public void onCreate(SQLiteDatabase db) {
      // tablo ekleme
        db.execSQL("CREATE TABLE IF NOT EXISTS EMP_TABLE(_id integer primary key,E_NAME text,E_AGE text,E_DEPT text)");
    }
  
    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
  
    }
  }
  </code></pre>
  
  <p>F_tarif_yaz class</p>
  
  <pre><code>public class F_tarif_yaz extends Fragment {
  
    private View root;
  
    Context con;
  
    private VT_baglanti3 db; 
    private TextView txt;
    Button bt;
  
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      root = inflater.inflate(R.layout.tarif_yaz, container, false);
      con=inflater.getContext();
  
      db=new VT_baglanti3(con);
      txt=(TextView)root.findViewById(R.id.txt);
      bt=(Button)root.findViewById(R.id.bt);
  
  
      bt.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Listele2();
          }
      });
  
      return root;
    }
  
    private void Listele2(){
      String sutunlar[]={"E_NAME","E_AGE","E_DEPT"};
      SQLiteDatabase sldb2=db.getReadableDatabase(); 
  
      Cursor cursor1=sldb2.query("exDB",sutunlar,null,null,null,null,null);
  
      String tumbilgi="";
  
      while (cursor1.moveToNext()){ 
          String adbilgi=cursor1.getString(cursor1.getColumnIndex("E_NAME")); 
  
         String soyadbilgi=cursor1.getString(cursor1.getColumnIndex("E_AGE"));
          String nobilgi=cursor1.getString(cursor1.getColumnIndex("E_DEPT"));  
  
          tumbilgi += adbilgi + " " + soyadbilgi + " " + nobilgi + " " + "\n"; 
  
      }
      txt.setText(tumbilgi);
    }
  }
  </code></pre>
  
  <p>Error log</p>
  
  <pre><code>/com.yeni E/AndroidRuntime: FATAL EXCEPTION: main
                                                      Process: com.yeni, PID: 1442
                                                      android.database.sqlite.SQLiteException: no such table: exDB (code 1): , while compiling: SELECT E_NAME, E_AGE, E_DEPT FROM exDB
                                                          at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
                                                          at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
                                                          at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
                                                          at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
                                                          at android.database.sqlite.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:58)
                                                          at android.database.sqlite.SQLiteQuery.&lt;init&gt;(SQLiteQuery.java:37)
                                                          at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
                                                          at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
                                                          at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1161)
                                                          at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1032)
                                                          at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1200)
                                                          at com.yeni.F_tarif_yaz.Listele2(F_tarif_yaz.java:50)
                                                          at com.yeni.F_tarif_yaz.access$000(F_tarif_yaz.java:15)
                                                          at com.yeni.F_tarif_yaz$1.onClick(F_tarif_yaz.java:39)
                                                          at android.view.View.performClick(View.java:4438)
                                                          at android.view.View$PerformClick.run(View.java:18422)
                                                          at android.os.Handler.handleCallback(Handler.java:733)
                                                          at android.os.Handler.dispatchMessage(Handler.java:95)
                                                          at android.os.Looper.loop(Looper.java:136)
                                                          at android.app.ActivityThread.main(ActivityThread.java:5001)
                                                          at java.lang.reflect.Method.invokeNative(Native Method)
                                                          at java.lang.reflect.Method.invoke(Method.java:515)
                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                                                          at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Error lines </p>
  
  <pre><code>com.yeni.F_tarif_yaz.Listele2(F_tarif_yaz.java:50)   at                        Cursor cursor1=sldb2.query("exDB",sutunlar,null,null,null,null,null);
  </code></pre>