It sounds like a good plan.  (I forgot to make use of the Local Record ID).
Thanks.

-Elizabeth



                                                                                       
                          
                    Jim Cooper                                                         
                          
                    <[EMAIL PROTECTED]>                 To:     Palm Developer 
Forum                         
                    Sent by:                                
<[EMAIL PROTECTED]>                     
                    bounce-palm-dev-forum-8072@news.        cc:                        
                          
                    palmos.com                              Subject:     Re: How Can I 
Set the Record Attribute  
                                                            So the Conduit Knows 
Record IsNew?                   
                                                                                       
                          
                    03/22/01 12:44 AM                                                  
                          
                    Please respond to Palm Developer                                   
                          
                    Forum                                                              
                          
                                                                                       
                          
                                                                                       
                          





> I have to handle the records differently.  I need to generate a new key
> before the new record is added to the Oracle database.  Do you process
new
> and modified records differently in the conduit?

The way I normally deal with it is that I know it's a new record if
there is no mapping record from the Palm local id to the pc/server
database unique id. (You can't set the id of a record on a Palm, so
there is normally a table mapping Palm records to pc/server records.)
This method works both ways; a new pc/server record won't have an entry
in that table either.

I find it helps to draw up a matrix of possibilities with Palm records
on one axis and PC/server records on the other. Then list all the
possible things that can happen to a record : no change, doesn't exist,
modified, deleted, archived, etc. Then fill in the action required for
each case (append to pc, append to Palm, overwrite PC, etc).

The new record cases are now the (modified,doesn't exist) pairs.


Cheers,
Jim Cooper

_____________________________________________

Jim Cooper      [EMAIL PROTECTED]
Tabdee Ltd      http://www.tabdee.ltd.uk

TurboSync - Writing Palm conduits with Delphi
_____________________________________________

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to