Question

With Sybase Central I've configured a MobiLink test object, where I'm trying to detect a unique constrain violation before uploading. Unfortunately it appears upload_fetch_column_conflict​ seems to not being executed. My events are configured like this on Sybase Central:

[...]
​Product (DBA): upload_fetch_column_conflict​
SELECT "DBA"."Product"."name",
    "DBA"."Product"."quantity",
    "DBA"."Product"."quality"
FROM "DBA"."Product"
WHERE "DBA."Product"."name" = {ml r."name} AND NOT (SELECT count(*) from "DBA"."Product" WHERE quality = {ml r.quality})> 0;
[...]

Any idea what I've maybe missed?

Was it helpful?

Solution

upload_fetch_column_conflict is only getting called, if there is a line updated. Therefore an insert will not trigger that function.

If inserting a new line which might conflict with a recent change on consolidated database, the conflict needs to be caught during upload workflow -- so e.g. inside processing of upload_insert.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top