Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ApplyUpdates

Posted on 1998-08-13
2
309 Views
Last Modified: 2010-04-04
How to check the cached records to prevent a key violation error when ApplyUpdates is called? Cause the cached records may have duplicated primary keys that do not exists in table.
0
Comment
Question by:oberdan
2 Comments
 
LVL 1

Expert Comment

by:pjdb
ID: 1362007
check everything in the BeforePost event. This way it will check any record before posting (and tehrefore before puting it to the CacheUpdates)

JDB
0
 

Accepted Solution

by:
keksperte earned 100 total points
ID: 1362008
when your program knows the new key, make a verify read with it in on a second chanel ( open the table with a second dbtable component i.g. name it 'temp' so that your origin tablecomponent become not be reflected). With this testread you will be able to catch all conflicts on the fly. Also you have not to enter the whole record and this method prevents you on prewrites.

hope this fix your problem
;-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question