Ver Fonte

Adressdaten

git-svn-id: svn://svn.siningsoft.de/Sailfish_Contacts_Restore@8 9ea9dde1-eeb2-4aae-9f27-8a0df3aa35ee
devnull há 4 anos atrás
pai
commit
88946e777c

+ 5 - 1
ContactRescue.py

@@ -34,6 +34,10 @@ try:
             print("debug: Contact " + row[1])
             
             
+            SQLADRCur = SQLconn.cursor()
+            for ADRrow in SQLADRCur.execute('SELECT * FROM Addresses JOIN Details on Details.detailId = Addresses.detailId where contactId = ' + str(contactID)):
+                adr = vcf.add('ADR').value = vobject.vcard.Address(street=ADRrow[2], city=ADRrow[5], region=ADRrow[4], code=ADRrow[6],country=ADRrow[7])
+            
             ## Abfragen Organisation
             SQLORGCur = SQLconn.cursor()
             for ORGrow in SQLORGCur.execute('SELECT * from Organizations where contactId = ' + str(contactID)):
@@ -43,7 +47,7 @@ try:
                     title = vcf.add('TITLE').value = str(ORGrow[4])
                 
                 if ORGrow[3] is not None:
-                    role = vcf.add('ROLE').value = str(ORGrow[3])
+                    role = vcf.add('ROLE').str = value(ORGrow[3])
                 
                 # Also parameters are possible. Could be read out
                 # | columnID | column        |

+ 1 - 1
SQL/Abfragen.sql

@@ -1,4 +1,4 @@
 SELECT * FROM Contacts;
 SELECT * FROM Contacts JOIN EmailAddresses ON Contacts.contactId = EmailAddresses.contactId;
 SELECT * from PhoneNumbers JOIN Details on Details.detailId = PhoneNumbers.detailId;
-
+SELECT * FROM Addresses JOIN Details on Details.detailId = Addresses.detailId;

BIN
Testdata/contacts_with-Phone-Mobile-Fax-Pager-Assistent-Addresses.db


BIN
Testdata/contacts_with-Phone-Mobile-Fax-Pager-Assistent-Addresses.db-shm


+ 0 - 0
Testdata/contacts_with-Phone-Mobile-Fax-Pager-Assistent-Addresses.db-wal


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
Testdata/contacts_with-Phone-Mobile-Fax-Pager-Assistent.sqbpro


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff