title: IllegalArgumentException: Version must be >= 1, was 0
body: <p>I'm getting an <code>"IllegalArgumentException: Version must be &gt;= 1, was 0"</code> error on the line:</p>
  
  <pre><code>super(context, name, factory, version, errorHandler);
  </code></pre>
  
  <p>in the following class and I'm not sure exactly why this is happening (I'm simply trying to add a username and password to my sqlite database - nothing more) </p>
  
  <pre><code>12-25 11:28:05.898: E/AndroidRuntime(31438): FATAL EXCEPTION: main
  12-25 11:28:05.898: E/AndroidRuntime(31438): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.idg.voiscphone/com.idg.voiscphone.Activity1}: java.lang.IllegalArgumentException: Version must be &gt;= 1, was 0
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.ActivityThread.access$600(ActivityThread.java:156)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.os.Handler.dispatchMessage(Handler.java:99)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.os.Looper.loop(Looper.java:153)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.ActivityThread.main(ActivityThread.java:5297)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at java.lang.reflect.Method.invokeNative(Native Method)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at java.lang.reflect.Method.invoke(Method.java:511)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at dalvik.system.NativeStart.main(Native Method)
  12-25 11:28:05.898: E/AndroidRuntime(31438): Caused by: java.lang.IllegalArgumentException: Version must be &gt;= 1, was 0
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.database.sqlite.SQLiteOpenHelper.&lt;init&gt;(SQLiteOpenHelper.java:100)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at com.idg.voiscphone.AddUser.&lt;init&gt;(AddUser.java:27)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at com.idg.voiscphone.Activity1.onCreate(Activity1.java:48)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.Activity.performCreate(Activity.java:5262)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270)
  12-25 11:28:05.898: E/AndroidRuntime(31438):    ... 11 more
  </code></pre>
  
  <h2>JAVA:</h2>
  
  <pre><code>public class AddUser extends SQLiteOpenHelper {
  
      public AddUser(Context context, String name, CursorFactory factory,
              int version, DatabaseErrorHandler errorHandler) {
          super(context, name, factory, version, errorHandler);
          // TODO Auto-generated constructor stub
      }
  
      private static final String tableName = "USER_RECORDS";
  
      public void onCreate(SQLiteDatabase database) {
  
          String insertSQL = "INSERT INTO " + tableName + " (" + "uname"
                  + "pword" + ");";
          Log.d("addRecord()", insertSQL);
          SQLiteDatabase dataBase = this.getWritableDatabase();
          dataBase.execSQL(insertSQL);
          dataBase.close();
  
      }
  
      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
          // TODO Auto-generated method stub
  
      }
  }
  </code></pre>