Just hold a copy of the DB and add a "PalmRecordIndex" column to each table
in it to track after the indices of the palm.
I personally held the copy DB under the hotsync username's folder, so
there's a copy for each hotsync user, and thus the system works for multiple
palms syncing with the same PC.
It takes a little special handling - find out when a table was added, or a
column added or changed, etc. I used ADO and ADOX libraries for that.
I also added ", 1 ASC" to the "ORDER BY" clause in the previous post. That
ensures that the SELECT result will be ordered by ID and then by the
TableName, so you will always have the record from Table A first, and Table
If you've got two "Table A"s in a row, that means the first record doesn't
exist in Table B.
It takes about a second to sync a 7,000+ record table. I have about 23
tables, and the entire process takes about 7 seconds.
Highly recommended. Thanks for the help guys.
2008/2/14, Jonathan Carse <jonathan.carse@gmai...>:
> Just an update to whoever is interested:
> My two-DBs solution will probably work out OK.
> If you've lost track, that means I keep an intermediate DB apart from the
> main DB on the PC, in order to pinpoint exactly what records have been
> modified since the last sync.
> And it will all be possible thanks to Jeff's awesome way<http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx>to compare tables (
> Just in case that blog will come down some day, here's the gist of his
> SELECT MIN(TableName) as TableName, ID, COL1, COL2, COL3 ...
> SELECT 'Table A' as TableName, A.ID, A.COL1, A.COL2, A.COL3, ...
> FROM A
> UNION ALL
> SELECT 'Table B' as TableName, B.ID, B.COL1, B.COl2, B.COL3, ...
> FROM B
> ) tmp
> GROUP BY ID, COL1, COL2, COL3 ...
> HAVING COUNT(*) = 1
> ORDER BY ID
> That shows any row that exists in Table A and that doesn't exist in Table
> B, and visa-versa.
> It's incredibly efficient because it uses UNION.
> I will report back in a few days/weeks to tell you guys if this way is a
> convenient way to by-pass implementing the bit-mask system manually.