Code example for SQLException

Methods: getLocalizedMessage

0
			 
 
		} 
		catch (SQLException e)
		{ 
			Log.d(TAG,"SQLite exception: " + e.getLocalizedMessage());
		} 
   } 
 
   private void CreateDatabase(SQLiteDatabase db)
   { 
		try 
		{ 
			db.execSQL(DBVERSION_CREATE);
			ContentValues args = new ContentValues();
			args.put("version", DATABASE_VERSION);
			db.insert(TABLE_DBVERSION, null, args);
 
			db.execSQL(TABLE_CREATE);
		} 
		catch (SQLException e)
		{ 
			Log.d(TAG,"SQLite exception: " + e.getLocalizedMessage());
		}  
   } 
    
   private void MigrateDatabase(SQLiteDatabase db, int fromVersion, int toVersion)
   { 
		try 
		{ 
			if ((fromVersion == 1)&&(toVersion == 2))
			{ 
				db.execSQL(TABLE_MIGRATE_1_2);
				ContentValues args = new ContentValues();
				args.put("version", DATABASE_VERSION);
				db.insert(TABLE_DBVERSION, null, args);
			} 
		} 
		catch (SQLException e)
		{ 
			Log.d(TAG,"SQLite exception: " + e.getLocalizedMessage());
		}  
   } 
 
   void deleteDatabase() 
   {