title: Can't insert rows in SQLite database in android
body: <p>I am trying to insert a couple of rows in a table in SQLite data base, I include this part of code in the main activity class as follows: </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity implements BottomNavigationView.OnNavigationItemSelectedListener {
  
      private TextView mTextMessage;
  
      Intent intent1;
  
      private DrawerLayout d;
      private ActionBarDrawerToggle a;
  
      TabLayout tab;
  
      ViewPager vp;
  
      ViewPagerAdapter vpa;
  
      GridLayout mainGrid;
  
      DBAdapter db;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
  
          insertSchools();
  
          d = (DrawerLayout) findViewById(R.id.container);
          a= new ActionBarDrawerToggle(MainActivity.this,d,R.string.open,R.string.close);
  
  
  
          d.addDrawerListener(a);
          a.syncState();
  
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
          intent1= new Intent(getApplicationContext(),MapsActivity.class);
  
         //NavigationView view = (NavigationView) findViewById(R.id.n);
  
          mainGrid = (GridLayout) findViewById(R.id.mainGrid);
  
          //Set Event
          setSingleEvent(mainGrid);
          //setToggleEvent(mainGrid);
  
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          if(a.onOptionsItemSelected(item)){
  
                     return  true;
          }
          return super.onOptionsItemSelected(item);
      }
  
      @Override
      public boolean onNavigationItemSelected(@NonNull MenuItem item) {
  
          int id = item.getItemId();
  
          if(id == R.id.item1){
  
              startActivity(intent1);
  
          }
  
          if(id==R.id.item2){
  
              Toast.makeText(this,"رأيك يهمنا",Toast.LENGTH_SHORT).show();
          }
  
  
  
  
          if(id==R.id.item5){
  
              Toast.makeText(this,"حول التطبيق",Toast.LENGTH_SHORT).show();
          }
  
  
          return false;
      }
  
  
      private void setToggleEvent(GridLayout mainGrid) {
          //Loop all child item of Main Grid
          for (int i = 0; i &lt; mainGrid.getChildCount(); i++) {
              //You can see , all child item is CardView , so we just cast object to CardView
              final CardView cardView = (CardView) mainGrid.getChildAt(i);
  
  
              cardView.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      if (cardView.getCardBackgroundColor().getDefaultColor() == -1) {
                          //Change background color
                          cardView.setCardBackgroundColor(Color.parseColor("#FF6F00"));
                          Toast.makeText(MainActivity.this, "State : True", Toast.LENGTH_SHORT).show();
  
                      } else {
                          //Change background color
                          cardView.setCardBackgroundColor(Color.parseColor("#FFFFFF"));
                          Toast.makeText(MainActivity.this, "State : False", Toast.LENGTH_SHORT).show();
                      }
                  }
              });
          }
      }
  
      private void setSingleEvent(GridLayout mainGrid) {
          //Loop all child item of Main Grid
          for (int i = 0; i &lt; mainGrid.getChildCount(); i++) {
              //You can see , all child item is CardView , so we just cast object to CardView
              CardView cardView = (CardView) mainGrid.getChildAt(i);
              final int finalI = i;
              cardView.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
  
                      if(finalI==0) {
                          Intent intent = new Intent(MainActivity.this, ListOfSchoolsPublic.class);
                          startActivity(intent);
                      }
  
                      else if(finalI==1){
  
                          Intent intent = new Intent(MainActivity.this,ListOfPrivateSchools.class);
                          startActivity(intent);
  
                      }
  
                  }
              });
          }
      }
  
  
      /////////////////////////////INSERT SCHOOLS//////////////////////////
  
      public  void insertSchools(){
  
          //SCHOOL-1
          openDB();
          db.insertSchool("مدرسة دار المعرفة","0797417018 - 0790889165","Math - Science",2009,"الأول - السابع","عن طريق مستودع التربية","جيدة جدا","مختبر حاسوب - مختبر علوم","480 - 550","اربد/مجمع الشيخ خليل/حي النزهة",35.85542,"خاصة",32.54845);
          closeDB();
          //SCHOOL-2
          openDB();
          db.insertSchool("مدرسة الروم الكاثوليك","07272881","فرنسي",1951,"بستان - ثاني ثانوي","الشراء من مستودع التربية","ممتازة","مختبر حاسوب - مختبر علوم - مكتبة - فرقة فن","روضة / 500 | الاول - ثاني ثنوي / 1100","اربد/شارع الحصن/بجانب اسواق مكة",35.85155,"خاصة",32.55172);
          closeDB();
          //SCHOOL-3
          openDB();
          db.insertSchool("مدرسة النوار بنت مالك ","لا يوجد","لا يوجد",1970,"لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد",35.85391,"حكومية",32.54843);
          closeDB();
          //SCHOOL-4
          openDB();
          db.insertSchool("مدرسة زبيدة بنت جعفر الأساسية","لا يوجد","لا يوجد",1970,"الثالث - السابع","لا يوجد","جيدة","لا يوجد","لا يوجد","لا يوجد",35.85316,"خاصة",32.54871);
          closeDB();
          //SCHOOL-5
          openDB();
          db.insertSchool("أكاديمية الفرح","027250551 - 0796550752","الغاز عربية للصف الاول - كراسة كتابة وخط - مصطلحات علمية باللغة الانجليزية - Math - Science - منهاج تعليمي الكتروني للرياضيات والعلوم والانجليزي من الصف الخامس للصف التاسع",1994,"الروضة - ثاني ثانوي","لا يوجد","لا يوجد","مختبر حاسوب","اول - سادس / 600 | سابع - تاسع / 700 | عاشر / 750 | اول ثانوي - ثاني ثانوي / 900 | الروضة / 450","اربد/الحي الجنوبي/شمال جامعة اليرموك/جنوب شرق اشارة الاسكان",35.85199,"خاصة",32.54356);
          closeDB();
          //SCHOOL-6
          openDB();
          db.insertSchool("مدرسة جمانة الثانوية للبنات","لا يوجد","لا يوجد",1970,"لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد",35.85352,"خاصة",32.53322);
          closeDB();
  
          //SCHOOL-7
          openDB();
          db.insertSchool("روضة ومدرسة ابن النفيس","لا يوجد","لا يوجد",1970,"لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد",35.85050,"حكومية",32.54680);
          closeDB();
  
          //SCHOOL-8
          openDB();
          db.insertSchool("مدرسة البحرينية","0772062317","لا يوجد",1970,"الأول - العاشر","لا يوجد","جيدة جدا","مختبر علوم - مختبر حاسوب1 - مختبر حاسوب2 - حضانة - حديقة","لا يوجد","اربد/الحي الشرقي/النزهة",35.86408,"حكومية",32.54847);
          closeDB();
  
          //SCHOOL-9
          openDB();
          db.insertSchool("مدرسة القادسية","0795527721","لا يوجد",1981,"لا يوجد","لا يوجد","ممتازة","مختبر حاسوب - مختبر علوم","لا يوجد","اربد/الحي الشرقي",35.86587,"حكومية",32.54785);
          closeDB();
  
          //SCHOOL-10
          openDB();
          db.insertSchool("مدرسة رقية بنت الرسول الأساسية للبنات","لا يوجد","لا يوجد",1970,"لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد","لا يوجد",35.85827,"خاصة",32.55319);
          closeDB();
  
          //SCHOOL-11
          openDB();
          db.insertSchool("مدرسة الإيمان التعليمية","07277323","Math - Science",1996,"الروضة - التاسع","الشراء من مستودع التربية","ممتازة","لا يوجد","الروضة / 850 | الاول - التاسع /1000","اربد/حي الشيخ خليل/مبنى راتب البطاينة",35.85887,"حكومية",32.54622);
          closeDB();
  
  
  
      }
  
  
  
      /////////////////////////////////////////////////////////////////////
  
  
  
  
  
      @Override
      protected void onDestroy() {
          super.onDestroy();
          closeDB();
  
      }// end onDestroy method
  
  
  
      //////////////////////////////////////////////////////////////////////
  
  
  
      private void openDB() {
          db = new DBAdapter(this);
          db.open();
      } // end openDB method
  
      //////////////////////////////////////////////////////////////////////
  
      private void closeDB() {
          db.close();
      } // end closeDB method
  
  }
  </code></pre>
  
  <p>I used a custom list view to retrieve schools names but I got error at run time and the data not added, the following is the database class: </p>
  
  <pre><code>public class DBAdapter  {
  
      private static final String TAG = "DBAdapter";
  
      //columns names users
      public static final String KEY_ROWID = "id";
      public static final String KEY_NAME = "name";
      public static final String KEY_PASSWD = "passwd";
      public static final String KEY_ADMIN = "isAdmin";
      public static final String KEY_U_PHONE = "phone";
  
      // School Table Columns names
      public static final String KEY_SCHOOLID = "schoolID";
      public static final String KEY_SCHOOLNAME = "schoolName";
      public static final String KEY_PHONE_NUM = "schoolPhone";
      public static final String KEY_MATERIALS = "schoolExtraM";
      public static final String KEY_FOUNDATION_DATE = "schoolFD";
      public static final String KEY_CLASSES = "schoolClasses";
      public static final String KEY_BUY_BOOKS = "schoolGetBooks";
      public static final String KEY_HEALTH = "schoolHealthSituation";
      public static final String KEY_LABORATORIES = "schoolLabs";
      public static final String KEY_LOCATION = "schoolLocation";
      public static final String KEY_FEES = "schoolFees";
      public static final String KEY_LATITUDE = "schoolLatitude";
      public static final String KEY_LONGITUDE = "schoolLongitude";
      public static final String KEY_SChOOL_TYPE = "schoolType";
  
  
      //columns numbers - users
      public static final int COL_ROWID_TABLE_1 = 0;
      public static final int COL_NAME_TABLE_1 = 1;
      public static final int COL_PASSWD_TABLE_1 = 2;
      public static final int COL_ADMIN_TABLE_1 = 3;
      public static final int COL_PHONE_NUM_TABLE_1 = 4;
  
      //columns numbers - schools
      public static final int COL_SCHOOLID_TABLE_2 = 0;
      public static final int COL_SCHOOLNAME_TABLE_2 = 1;
      public static final int COL_PHONE_NUM_TABLE_2 = 2;
      public static final int COL_MATERIALS_TABLE_2 = 3;
      public static final int COL_FOUNDATION_DATE_TABLE_2 = 4;
      public static final int COL_CLASSES_TABLE_2 = 5;
      public static final int COL_BUY_BOOKS_TABLE_2 = 6;
      public static final int COL_HEALTH_TABLE_2 = 7;
      public static final int COL_LABORATORIES_TABLE_2 = 8;
      public static final int COL_LOCATION_TABLE_2 = 9;
      public static final int COL_FEES_TABLE_2 = 10;
      public static final int COL_LATITUDE_TABLE_2 = 11;
      public static final int COL_LONGITUDE_TABLE_2 = 12;
      public static final int COL_SChOOL_TYPE_TABLE_2 = 13;
  
  
  
      // array for the columns names
      public static final String[] ALL_KEYS_TABLE_1 = new String[] {KEY_ROWID, KEY_NAME, KEY_PASSWD, KEY_ADMIN,KEY_U_PHONE};
  
      public static final String[] ALL_KEYS_TABLE_2 = new String[] {KEY_SCHOOLID, KEY_SCHOOLNAME, KEY_PHONE_NUM, KEY_MATERIALS,KEY_FOUNDATION_DATE,KEY_CLASSES,KEY_BUY_BOOKS,KEY_HEALTH,KEY_LABORATORIES,KEY_LOCATION,KEY_FEES,KEY_LATITUDE,KEY_LONGITUDE,KEY_SChOOL_TYPE};
  
      // the database name and the table name
      public static final String DATABASE_NAME = "MyDb";
      public static final String DATABASE_TABLE_1 = "users";
      public static final String DATABASE_TABLE_2 = "schools";
      // version 
      public static final int DATABASE_VERSION = 8;
  
      // create table query
      private static final String DATABASE_CREATE_SQL_1 =
              "create table " + DATABASE_TABLE_1
                      + "("
                      + KEY_ROWID + " integer primary key autoincrement,"
                      + KEY_NAME+ " text not null,"
                      + KEY_PASSWD + " text not null,"
                      +KEY_ADMIN  + " integer not null,"
                      + KEY_U_PHONE  + " text not null"  + ")";
  
      private static final String DATABASE_CREATE_SQL_2 =
              "create table " + DATABASE_TABLE_2
                      + "("
                      + KEY_SCHOOLID + " integer primary key autoincrement,"
                      + KEY_SCHOOLNAME + " text not null,"
                      + KEY_PHONE_NUM + " text not null,"
                      + KEY_MATERIALS + " text not null,"
                      + KEY_FOUNDATION_DATE + " integer not null,"
                      + KEY_CLASSES + " text not null,"
                      + KEY_BUY_BOOKS + " text not null,"
                      + KEY_HEALTH + " text not null,"
                      + KEY_LABORATORIES + " text not null,"
                      + KEY_FEES + " text not null,"
                      + KEY_LOCATION + " text not null,"
                      + KEY_LONGITUDE + " double not null,"
                      + KEY_SChOOL_TYPE + " text not null,"
                      + KEY_LATITUDE + " double not null"  + ")";
  
  
  
      private final Context context;
  
      // initiates instances from class DatabaseHelper and SQLiteDatabase 
      private DatabaseHelper myDBHelper;
      private SQLiteDatabase db; // database
  
  
      // constructor
      public DBAdapter(Context ctx) {
  
  
          this.context = ctx;
          myDBHelper = new DatabaseHelper(context);
  
      }
  
  
      public DBAdapter open() {
          db = myDBHelper.getWritableDatabase();
          return this;
      }
  
  
      public void close() {
          myDBHelper.close();
      }
  
  
      public long insertSchool(String name, String phone,String materials, int fDate,String classes,String books,String health,String labs,String fees,String location,double longitude,String type,double latitude) {
  
          ContentValues initialValues = new ContentValues();
          initialValues.put(KEY_NAME, name);
          initialValues.put(KEY_PHONE_NUM,phone);
          initialValues.put(KEY_MATERIALS, materials);
          initialValues.put(KEY_FOUNDATION_DATE, fDate);
          initialValues.put(KEY_CLASSES, classes);
          initialValues.put(KEY_BUY_BOOKS, books);
          initialValues.put(KEY_HEALTH,health);
          initialValues.put(KEY_LABORATORIES, labs);
          initialValues.put(KEY_FEES, fees);
          initialValues.put(KEY_LOCATION, location);
          initialValues.put(KEY_LONGITUDE, longitude);
          initialValues.put(KEY_SChOOL_TYPE, type);
          initialValues.put(KEY_LATITUDE, latitude);
  
  
          return db.insert(DATABASE_TABLE_2, null, initialValues);
      }
  
      public long insertUser(String name, String passwd,int isAdmin, String phone) {
  
          ContentValues initialValues = new ContentValues();
          initialValues.put(KEY_NAME, name);
          initialValues.put(KEY_PASSWD, passwd);
          initialValues.put(KEY_ADMIN, isAdmin);
          initialValues.put(KEY_U_PHONE, phone);
  
  
          return db.insert(DATABASE_TABLE_1, null, initialValues);
      }
  
  
      public boolean deleteShool(String schoolName) {
          String where = KEY_SCHOOLNAME + "='" + schoolName + "'";
          return db.delete(DATABASE_TABLE_2, where, null) != 0;
      }
  
  
          public boolean deleteSchoolById(long rowId) {
              String where = KEY_SCHOOLID + "=" + rowId;
              return db.delete(DATABASE_TABLE_2, where, null) != 0;
          }
  
      public void deleteAll() {
          Cursor c = getAllRows();
          long rowId = c.getColumnIndexOrThrow(KEY_SCHOOLID);
          if (c.moveToFirst()) {
              do {
                  deleteSchoolById(c.getLong((int) rowId));
              } while (c.moveToNext());
          }
          c.close();
      }
  
  
      public Cursor getAllRows() {
          String where = null;
          Cursor c =  db.query(true, DATABASE_TABLE_2, ALL_KEYS_TABLE_2,
                              where, null, null, null, null, null);
          if (c != null) {
              c.moveToFirst();
          }
          return c;
      }
  
  
      public Cursor getAllUsersRows() {
          String where = null;
          Cursor c =  db.query(true, DATABASE_TABLE_1, ALL_KEYS_TABLE_1,
                  where, null, null, null, null, null);
          if (c != null) {
              c.moveToFirst();
          }
          return c;
      }
  
  
      public Cursor getRow(long rowId) {
          String where = KEY_SCHOOLID+ "=" + rowId;
          Cursor c =  db.query(true, DATABASE_TABLE_2, ALL_KEYS_TABLE_2,
                          where, null, null, null, null, null);
          if (c != null) {
              c.moveToFirst();
          }
          return c;
      }
  
  
  
      public Cursor getRowByName(String name) {
          String where = KEY_SCHOOLNAME + "='" + name+"'";
          Cursor c =  db.query(true, DATABASE_TABLE_2, ALL_KEYS_TABLE_2,
                          where, null, null, null, null, null);
          if (c != null) {
              c.moveToFirst();
          }
          return c;
      }
  
  
  
      private static class DatabaseHelper extends SQLiteOpenHelper
      {
          DatabaseHelper(Context context) {
              super(context, DATABASE_NAME, null, DATABASE_VERSION);
          }
  
          @Override
          public void onCreate(SQLiteDatabase _db) {
  
              _db.execSQL(DATABASE_CREATE_SQL_1);
              _db.execSQL(DATABASE_CREATE_SQL_2);
  
  
          }
  
          @Override
          public void onUpgrade(SQLiteDatabase _db, int oldVersion, int newVersion) {
              Log.w(TAG, "Upgrading application's database from version " + oldVersion
                      + " to " + newVersion + ", which will destroy all old data!");
  
  
               _db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE_1);
              _db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE_2);
  
  
              onCreate(_db);
  
  
  
          }
  
  
      }
  
  
  
  }
  </code></pre>
  
  <p>LOG:</p>
  
  <pre><code> --------- beginning of /dev/log/main
    android.view.ViewConfiguration.getScaledHorizontalScrollFactor, referenced from method android.support.v4.view.ViewConfigurationCompat.getScaledHorizontalScrollFactor
  04-11 10:53:36.018 2231-2231/com.example.welcome.madrasti W/dalvikvm: VFY: unable to resolve virtual method 21145: Landroid/view/ViewConfiguration;.getScaledHorizontalScrollFactor ()F
  04-11 10:53:36.018 2231-2231/com.example.welcome.madrasti D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
  04-11 10:53:36.018 2231-2231/com.example.welcome.madrasti I/dalvikvm: Could not find method android.view.ViewConfiguration.getScaledVerticalScrollFactor, referenced from method android.support.v4.view.ViewConfigurationCompat.getScaledVerticalScrollFactor
  04-11 10:53:36.018 2231-2231/com.example.welcome.madrasti W/dalvikvm: VFY: unable to resolve virtual method 21150: Landroid/view/ViewConfiguration;.getScaledVerticalScrollFactor ()F
  04-11 10:53:36.018 2231-2231/com.example.welcome.madrasti D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
  04-11 10:53:36.050 2231-2231/com.example.welcome.madrasti E/SQLiteLog: (1) table schools has no column named name
  04-11 10:53:36.050 2231-2231/com.example.welcome.madrasti E/SQLiteDatabase: Error inserting schoolFees=480 - 550 schoolLocation=اربد/مجمع الشيخ خليل/حي النزهة schoolLatitude=32.54845 schoolLabs=مختبر حاسوب - مختبر علوم schoolPhone=0797417018 - 0790889165 name=مدرسة دار المعرفة schoolExtraM=Math - Science schoolLongitude=35.85542 schoolClasses=الأول - السابع schoolType=خاصة schoolHealthSituation=جيدة جدا schoolFD=2009 schoolGetBooks=عن طريق مستودع التربية
      android.database.sqlite.SQLiteException: table schools has no column named name (code 1): , while compiling: INSERT INTO schools(schoolFees,schoolLocation,schoolLatitude,schoolLabs,schoolPhone,name,schoolExtraM,schoolLongitude,schoolClasses,schoolType,schoolHealthSituation,schoolFD,schoolGetBooks) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
          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.SQLiteStatement.&lt;init&gt;(SQLiteStatement.java:31)
          at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1467)
          at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)
          at com.example.welcome.madrasti.DBAdapter.insertSchool(DBAdapter.java:152)
          at com.example.welcome.madrasti.MainActivity.insertSchools(MainActivity.java:172)
          at com.example.welcome.madrasti.MainActivity.onCreate(MainActivity.java:51)
          at android.app.Activity.performCreate(Activity.java:5231)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          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)
  04-11 10:53:36.054 2231-2231/com.example.welcome.madrasti E/SQLiteLog: (1) table schools has no column named name
  04-11 10:53:36.058 2231-2231/com.example.welcome.madrasti E/SQLiteDatabase: Error inserting schoolFees=روضة / 500 | الاول - ثاني ثنوي / 1100 schoolLocation=اربد/شارع الحصن/بجانب اسواق مكة schoolLatitude=32.55172 schoolLabs=مختبر حاسوب - مختبر علوم - مكتبة - فرقة فن schoolPhone=07272881 name=مدرسة الروم الكاثوليك schoolExtraM=فرنسي schoolLongitude=35.85155 schoolClasses=بستان - ثاني ثانوي schoolType=خاصة schoolHealthSituation=ممتازة schoolFD=1951 schoolGetBooks=الشراء من مستودع التربية
      android.database.sqlite.SQLiteException: table schools has no column named name (code 1): , while compiling: INSERT INTO schools(schoolFees,schoolLocation,schoolLatitude,schoolLabs,schoolPhone,name,schoolExtraM,schoolLongitude,schoolClasses,schoolType,schoolHealthSituation,schoolFD,schoolGetBooks) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
          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.SQLiteStatement.&lt;init&gt;(SQLiteStatement.java:31)
          at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1467)
          at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)
          at com.example.welcome.madrasti.DBAdapter.insertSchool(DBAdapter.java:152)
          at com.example.welcome.madrasti.MainActivity.insertSchools(MainActivity.java:176)
          at com.example.welcome.madrasti.MainActivity.onCreate(MainActivity.java:51)
          at android.app.Activity.performCreate(Activity.java:5231)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          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)
  04-11 10:53:36.062 2231-2231/com.example.welcome.madrasti E/SQLiteLog: (1) t
  </code></pre>
  
  <p>I do not know why the rows are not inserted in the database, any help please!?! is Arabic language is the reason? </p>