title: FATAL EXCEPTION: main sqlite
body: <p>I cant understand this error, in my update command i have  10 fields to be updated but with this error <code>09-17 17:18:25.234: E/AndroidRuntime(4929): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jpos/com.sys.Main}: java.lang.IllegalArgumentException: the bind value at index 11 is null</code></p>
  
  <p>it indicates that index 11 is null but the total column to be field at my table is 10.</p>
  
  <pre><code>09-17 17:18:25.203: W/dalvikvm(4929): threadid=1: thread exiting with uncaught exception (group=0x40015560)
  09-17 17:18:25.234: E/AndroidRuntime(4929): FATAL EXCEPTION: main
  09-17 17:18:25.234: E/AndroidRuntime(4929): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jpos/com.sys.Main}: java.lang.IllegalArgumentException: the bind value at index 11 is null
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.os.Handler.dispatchMessage(Handler.java:99)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.os.Looper.loop(Looper.java:123)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.ActivityThread.main(ActivityThread.java:3647)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at java.lang.reflect.Method.invokeNative(Native Method)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at java.lang.reflect.Method.invoke(Method.java:507)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at dalvik.system.NativeStart.main(Native Method)
  09-17 17:18:25.234: E/AndroidRuntime(4929): Caused by: java.lang.IllegalArgumentException: the bind value at index 11 is null
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:237)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1701)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1636)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at com.jpos.classes.jposDbHelperHashMap.updateTableMunicipality(DbHelperHashMap.java:103)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at com.jpos.JPOSMain.UpdateTableMunicipalityCodes(JPOSMain.java:146)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at com.jpos.JPOSMain.onCreate(JPOSMain.java:115)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
  09-17 17:18:25.234: E/AndroidRuntime(4929):     ... 11 more
  </code></pre>
  
  <p>here is my update command</p>
  
  <pre><code> private void UpdateTableMunicipalityCodes() {
          HashMap&lt;String, String&gt; queryValues =  new  HashMap&lt;String, String&gt;();
  
          queryValues.put("munc_id", "7");
          queryValues.put("rdo_code", "999" );
          queryValues.put("munc_code", "999");
          queryValues.put("munc_desc", "UPDATECOMMAND");
          queryValues.put("area_code", "999");
          queryValues.put("created_date", "2013-17-2013 06:02:29");
          queryValues.put("created_by", "SYSGENn");
          queryValues.put("last_modified_date", "2013-17-2013 07:02:09");
          queryValues.put("last_modified_by", "SYSGENn");
          queryValues.put("munc_status", "A");
          hashDbHelper.updateTableMunicipality(queryValues);
  
        }
  </code></pre>
  
  <p>to be pass here:</p>
  
  <pre><code>public void updateTableMunicipality(HashMap&lt;String, String&gt; queryValues) 
  { 
          database = this.getWritableDatabase();  
          ContentValues values = new ContentValues();
          values.put("MUNC_ID", queryValues.get("munc_id"));
          values.put("RDO_CODE", queryValues.get("rdo_code"));
          values.put("MUNC_CODE", queryValues.get("munc_code"));
          values.put("MUNC_DESC", queryValues.get("munc_desc"));
          values.put("AREA_CODE", queryValues.get("area_code"));
          values.put("CREATED_DATE", queryValues.get("created_date"));
          values.put("CREATED_BY", queryValues.get("created_by"));
          values.put("LAST_MODIFIED_DATE", queryValues.get("last_modified_date"));
          values.put("LAST_MODIFIED_BY", queryValues.get("last_modified_by"));
          values.put("MUNC_STATUS", queryValues.get("munc_status"));      
          database.update("tbl_municipality_codes", values, "MUNC_ID" + " = ?",     newString[] { queryValues.get("MUNC_ID") });
          System.out.println("Updated " + queryValues.get("munc_id"));        
        }
  </code></pre>
  
  <blockquote>
    <p>Here is my create table query</p>
  </blockquote>
  
  <pre><code>    query ="CREATE TABLE [tbl_municipality_codes] (" +
                "[MUNC_ID] [INT(1000)] NOT NULL," +
                "[RDO_CODE] [VARCHAR(50)] NOT NULL," +
                "[MUNC_CODE] [VARCHAR(50)] NOT NULL, " +
                "[MUNC_DESC] [VARCHAR(100)] NOT NULL, "+
                "[AREA_CODE] VARCHAR, "+
                "[CREATED_DATE] DATETIME NOT NULL," +
                "[CREATED_BY] [VARCHAR(50)] NOT NULL, "+
               "[LAST_MODIFIED_DATE] DATETIME," +
                "[LAST_MODIFIED_BY] [VARCHAR(50)],"+
                "[MUNC_STATUS] [VARCHAR(1)] NOT NULL,"+
                "CONSTRAINT [sqlite_autoindex_tbl_municipality_codes_1] PRIMARY KEY ([MUNC_ID]))";
  </code></pre>
  
  <blockquote>
    <p>i think my error is in the constraint auto indexer from my table.. how can i fix it?</p>
  </blockquote>