Solved

ApplyUpdates

Posted on 1998-08-13
2
304 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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now