Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Empty Table and Published Database PK Viloation
Tue, Feb 16 2016 10:27 AMPermanent Link

Rolf Frei

eicom GmbH

I have a published database table where I do an Empty Table call and refill
the table with new values. Now the problem is, that I get primary key
violations on loading this changes on the server database. I have found out
that the new published update file includes only the inserts but not the
deletes of the empty table call.

Is this a bug? Shouldn't this also produce delete entries in the publshing
file?

Regards
Rolf
Tue, Feb 16 2016 11:09 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rolf


My bet is that its the EMPTY TABLE rather than DELETE FROM that's causing the problem.

Dear old DBISAM used to chop the table files off just after the header, since that's now stored in the catalog ElevateDB essentially just deletes the table files (my workround before Tim added in EMPTY TABLE was to just delete the files through Delphi).

So try DELETE FROM - its slower but it should give the engine something to work with,

Roy Lambert
Thu, Feb 18 2016 11:15 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rolf,

<< I have a published database table where I do an Empty Table call and refill the table with new values. Now the problem is, that I get primary key violations on loading this changes on the server database. I have found out that the new published update file includes only the inserts but not the deletes of the empty table call.

Is this a bug? Shouldn't this also produce delete entries in the publshing file? >>

No, EMPTY TABLE simply kills all data in the table.  It does not get logged for replication.  As Roy indicated, if you want that type of functionality, you should use a DELETE statement instead.

Tim Young
Elevate Software
www.elevatesoft.com
Image