Subject | Re: [IBO] Field value required - MIDAS |
---|---|
Author | Helen Borrie |
Post date | 2001-07-05T07:34:28Z |
At 08:04 AM 05-07-01 +0100, you wrote:
MyDataset.InternalDataset.ColumnAttributes.LinkValues['TEST_PK'] := IB_NOTREQUIRED;
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi All,If setting the Required property in the Delphi Object Inspector (when the persistent field object is selected in the Delphi Fields Editor) doesn't work, then access the IBO InternalDataset.ColumnAttributes in the BeforePost event and set it there, viz.
>I have, I am sure a simple problem :
>Client server application using IBOBJECTS and MIDAS/MTS.
>Table TEST :
>field TEST_PK integer not null
>field TEST_DATA integer
>trigger before_insert
>generator GEN_TEST_PK
MyDataset.InternalDataset.ColumnAttributes.LinkValues['TEST_PK'] := IB_NOTREQUIRED;
>I then create a test client app with just one dbgrid.Don't set AutogenerateValue to arAutoinc because a generator is not an Autoinc type. Leave it arNone.
>I cannot create a row if I don't put the value of the primary key myself. (I get "Field value required)
>I set up the generator on the IBOQuery on the DELPHI server side.
>I tried to change the properties "required", "autogeneratedvalue", "required" on the CLient Dataset but it still doesn't work.
>I believe the problem is on the client side as I don't think my insert ever goes to the server.What is the code for your Before Insert trigger?
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________