public class test extends Activity {

 SQLiteDatabase mDatabase;

  private static final String DATABASE_NAME = "alarmdb.db";
  private static final String CREATE_TABLE =
   "CREATE TABLE alarmtable (id INTEGER PRIMARY KEY AUTOINCREMENT ,           " +
   "        a TEXT, b TEXT);      ";
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
        
        
      SQLiteDatabase mDatabase;
      setContentView(R.layout.main);
      
   // Delete the old database file, if it exists
   mDatabase = openOrCreateDatabase(DATABASE_NAME,
     SQLiteDatabase.CREATE_IF_NECESSARY, null);
   
   mDatabase.setLocale(Locale.getDefault()); // Set the locale
   mDatabase.setLockingEnabled(true); // SQLiteDatabase is made thread-safe by using locks around critical sections.
   mDatabase.setVersion(1); // Sets the database version.
   mDatabase.execSQL(CREATE_TABLE);
   
        ContentValues values = new ContentValues();
   values.put("a", "aa");
   values.put("b", "bb");
   mDatabase.insert("alarmtable", null, values);
   
     }
    
}

요렇게 하니 mDatabase.execSQL(CREATE_TABLE);이부분에서 오류가 나더군요...ㅠㅠ 왜그런지랑 해결 방법좀..

그리고 DB랑 테이블은 한번만 생성 되야 하는데 어떻게 처리 해야 되나요?