Results 1 to 4 of 4
  1. dcpedit's Avatar
    Posts
    12 Posts
    Global Posts
    13 Global Posts
       #1  
    I've created a script that will read the contacts out of your database and build a CVS file that you can import into google. I did this so that my contacts can be centralized in one place. I've posted the instructions on webos-internals.org here:

    PalmDatabase.db3 File - WebOS Internals

    It does require that you have access to your Pre file system, as well as linux knowledge. You have to copy the database file locally, download sqlite3, and run the perl script (which requires perl).
  2. dcpedit's Avatar
    Posts
    12 Posts
    Global Posts
    13 Global Posts
       #2  
    I'm running into a problem with the delete script. When I try to run this statement:

    Code:
    DELETE FROM com_palm_pim_Person WHERE id=31885837205535;
    I get the error:

    "no such collation sequence: LOCALIZED_SECONDARY"

    Does anyone know sqlite well enough to help with this. Until this is fixed, you will have to delete duplicate contacts from your Pre manually, one by one

    Here's the schema for com_palm_pim_Person

    Code:
    CREATE TABLE com_palm_pim_Person (prefix TEXT, firstName TEXT, middleName TEXT, lastName TEXT, nickname TEXT, suffix TEXT, companyName TEXT, pictureLoc TEXT, pictureLocSquare TEXT, pictureLocBig TEXT, ringtoneLoc TEXT, messagingRingtoneLoc TEXT, ringtoneName TEXT, messagingRingtoneName TEXT, contactCount INTEGER, displayText TEXT, isVIP INTEGER, isMe INTEGER, launcherId TEXT, backupID INTEGER, sortKey TEXT, imAvailability INTEGER, reminder TEXT, id INTEGER PRIMARY KEY, _class_id INTEGER, _mod_num INTEGER, _flags INTEGER, sortKeyIntl TEXT COLLATE LOCALIZED_SECONDARY);
    CREATE INDEX sortKeyIntl_idx_com_palm_pim_Person ON com_palm_pim_Person (sortKeyIntl);
    CREATE TRIGGER com_palm_pim_Person_contacts_delete_trigger AFTER DELETE ON com_palm_pim_Person BEGIN UPDATE com_palm_pim_Contact SET _mod_num = (SELECT * FROM _CurrentModificationNumber_view), com_palm_pim_Person_id = NULL WHERE com_palm_pim_Person_id = OLD.id; END;
    CREATE TRIGGER com_palm_pim_Person_insert_sequence_trg AFTER INSERT ON com_palm_pim_Person BEGIN UPDATE _ClassSequence SET number = (NEW.id & 1099511627775) WHERE id = 31; END;
    Last edited by dcpedit; 07/24/2009 at 01:36 PM.
  3. #3  
    I found this workaround, but it can only be done on the device (probably from the simulator as well). From the pre command line:

    Code:
    root@castle:/var/luna/data/dbdata# sqlite3 PalmDatabase.db3
    sqlite> .load /usr/lib/sqlite3_palm_extension.so
    This will load the pre custom collation and allow you to delete records. I was able to get rid of all the crap I originally migrated over with duplicates. Now I only have contacts from gmail.

    I would recommend backing up your database before mucking around too much, you can easily break things. (I did a couple of times).
  4. #4  
    Quote Originally Posted by dcpedit View Post
    I've created a script that will read the contacts out of your database and build a CVS file that you can import into google. I did this so that my contacts can be centralized in one place. I've posted the instructions on webos-internals.org here:

    PalmDatabase.db3 File - WebOS Internals

    It does require that you have access to your Pre file system, as well as linux knowledge. You have to copy the database file locally, download sqlite3, and run the perl script (which requires perl).
    I know it's been a while since you posted this...

    I've been trying to modify your code to include the address (Location), but I have not been successful yet. Any chance you can look into it? I would appreciate it.

    Thanks in advance!

Posting Permissions