RE: Push Method - overwriting data
From: Brad Syputa - MS (bradsy_at_Online.Microsoft.com)
Date: 05/20/04
- Next message: Syed N. Yousuf [MS]: "RE: unable to initialize provider"
- Previous message: Brad Syputa - MS: "RE: Replication/RDA in .Net"
- In reply to: Wes: "Push Method - overwriting data"
- Next in thread: Wes: "RE: Push Method - overwriting data"
- Reply: Wes: "RE: Push Method - overwriting data"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 May 2004 21:41:59 GMT
Hi Wes,
I do not quite follow your problem, but it is probable fairly simple to fix.
If you are deleting records at the SqlCe Database, then inserting new
records, on Push you will be essentially deleting those same records at the
SQL Server and inserting the new records.
Keep track of when and how you delete the records. SqlCe RDA has a simple
mechanism that the last writer to the database wins. If you have 2 SqlCe
Clients, and they both delete the same record, but insert a new record with
the same PK value, the last writer will win over writing the first.
RDA tracks the data by the PK. If you are deleting and using the same PK
over and over, you will run into your issue mentioned below if you have
more then one client or you are changing records at the SQL Server acting
as a second client.
--------------------
| Content-Class: urn:content-classes:message
| From: "Wes" <wharrison@adcbarcode.com>
| Sender: "Wes" <wharrison@adcbarcode.com>
| Subject: Push Method - overwriting data
| Date: Thu, 20 May 2004 05:43:56 -0700
| Lines: 15
| Message-ID: <faf801c43e68$1d6a1970$a001280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcQ+aB1q/5a5pGeEQa6IkDgk5iRenw==
| Newsgroups: microsoft.public.sqlserver.ce
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.ce:12446
| NNTP-Posting-Host: tk2msftngxa08.phx.gbl 10.40.1.160
| X-Tomcat-NG: microsoft.public.sqlserver.ce
|
| I am pushing records into a SQL table on my PC from my
| PPC. The table has a primary key defined.
|
| My problem is sometimes records in the SQL database are
| being overwritten by the new records, even with no
| conflict on the Primary Key.
|
| This tends to happen after I empty the SQL table (process
| all the transactions & remove the records).
|
| When I then push a new record to the table (Record #1),
| this workds ok. But then, when i push another record to
| the table (Record #2) is overwrites Record #1
|
| Please help!
|
- Next message: Syed N. Yousuf [MS]: "RE: unable to initialize provider"
- Previous message: Brad Syputa - MS: "RE: Replication/RDA in .Net"
- In reply to: Wes: "Push Method - overwriting data"
- Next in thread: Wes: "RE: Push Method - overwriting data"
- Reply: Wes: "RE: Push Method - overwriting data"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|