Hello all,
Now that I've gotten over the initial hump of linking to an external database (via ODBC), I'm still having trouble tweaking the process (I figured I might as well start a new thread, because my initial question about ODBC was very vague).
Here's the issue: With the sample ODBC database ("SQLNotesIssuesTracking"), I did an experiment. I deleted all the entries in the sample database, then did a sync. But only the first record in the database (the issue titled "Outlook-style Calendar"), reappeared when I ran the sync. In other words, the actions of deleting all and then re-syncing lead to a database of only one record.
The same thing is happening with my connection to my Zotero sqlite file --- I can get only one record out of over a thousand.
Is the behaviour I describe above for the sample database expected? It occurred to me that maybe it was necessary to have existing items to sync to (rather than a blank database), but creating additional blank items did nothing --- I still can get only one record after clearing the sample database.
Any pointers would be great -- like I said in my other post, I'm totally new to SQL, so I may be misunderstanding something obvious. But I'm figuring I should first figure out what's happening with the sample database, and then I should be able to apply what I learn to my own database.
Thanks,
Lucas
Comments
<ConnectionString>
Driver={SQLite3 ODBC Driver};
DSN=ztester;
Database=C:\Documents and Settings\Lucas\My Documents\ztester.sqlite;
</ConnectionString>
<FieldMap>
[title] item
[itemid] iditem_import
[datemodified] dateupdate
[key] b26_zotkey
</FieldMap>
<Source>
select items.itemid, itemdatavalues.value AS title, items.key, items.datemodified
from
items
join itemdata
on items.itemid=itemdata.itemid
join itemdatavalues
on itemdata.valueid=itemdatavalues.valueid
where itemdata.fieldid=110
limit 10
;
</source>
<RecordIDField>iditem_import</RecordIDField>
<RecordStatus>IDimportType new update</RecordStatus>
<RecordDateField>dateupdate</RecordDateField>
<LastUpdate>2006-05-17 21:10:48</LastUpdate>
<ConnectionString>
Driver={MySQL ODBC 3.51 Driver};Server=mysql408.ixwebhosting.com;Port=3306;Database=NeoTech_mySQLMantis;User=NeoTech_MantisVW;Option=3;</ConnectionString>
<Password>ÙÞÚÌÎÏ</Password>
<FieldMap>
[id] MantisBugID
[summary] item
[last_updated] LastUpdated
</FieldMap>
<Source>
select mantis_bug_table.id, mantis_bug_table.summary, mantis_bug_table.last_updated
FROM mantis_bug_table
;
</source>
<RecordIDField>MantisBugID</RecordIDField>
<RecordStatus>IDImportType New Update</RecordStatus>
<RecordDateField>LastUpdated</RecordDateField>
<LastUpdate>2009-05-17 21:10:48</LastUpdate>
The reason is that the <RecordStatus> line makes reference to the IDImportType, but it is not in the FieldMap section. I can look into the reason for this requirement, but right now, this is the way it works !