Updating the database

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Updating the database

Postby kurdak » Sat Jun 02, 2012 6:04 pm

Welcome.
Database updated in this way:
Code: Select all
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    if (newVersion > oldVersion) {
        Log.e("TAG", "New database version exists for upgrade.");

        try {
            Log.e("TAG", "Copying database...");
            copyDataBase();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}

The problem is that I have a table in the database of statistics, I wanted to order the data in this table are copied into the new database.

How do I? Ask for an example.

Regards and sorry for my poor English.
kurdak
Freshman
Freshman
 
Posts: 8
Joined: Thu Oct 20, 2011 3:44 pm
Location: Poland

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests