The data value violates the schema´s constraint for the ..

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

The data value violates the schema´s constraint for the ..

Post by luis_augusto » Wed 31 Aug 2011 21:28

Here is the problem:

I have a Mastertable that is empty
I also have a not empty Detailtable (TUnitable, only) whose key is a TAutoincField

Unidac raises an exception due the param to acess detailtable cannot be null:

Parameter[0]: Number - The data value violates the schema´s constraint for
the column (Status = Bh)
In the begining of Sdac this error had ocurred, but it was fixed.

It seems that unidac has the same problem.

AndreyZ

Post by AndreyZ » Thu 01 Sep 2011 12:34

Hello,

I cannot reproduce the problem. Please post here or send to andreyz*devart*com a script to create your master and detail tables. Also please specify the way you establish master/detail relationship. Are you using the MasterFields and DetailFields properties, or SQL code?

luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

Post by luis_augusto » Fri 02 Sep 2011 20:04

I sent you the required example.

AndreyZ

Post by AndreyZ » Mon 05 Sep 2011 08:33

Thank you for the information. We have reproduced the problem and the investigation of the problem is in progress. As soon as we solve the problem we will let you know.

luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

Any news, yet?

Post by luis_augusto » Tue 13 Sep 2011 13:57

Dear sirs,

Do you know how can I by pass this problem while you are investigating it?

It is mostly sure an incompatibility between the Integer master Field (which can be null) and the Autoinc detail Field (which cannot be null).

If there will be no workaround to this, every master-detail relationship between a query and a table will be compromised and will have to be checked in a large system, like mine.

Thanks

AndreyZ

Post by AndreyZ » Tue 13 Sep 2011 14:26

We have already fixed this problem. This fix will be included in the next UniDAC build. We are going to release UniDAC this week.

Post Reply