Solved

ApplyUpdates

Posted on 1998-08-13
2
313 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
[X]
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
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

726 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