Board index » delphi » Field Value Required - BUG?!

Field Value Required - BUG?!

Hello,

This error does happen with all the TFields with Required=False.

I don't get to include a registration in GRID before executing
ApplyUpdates(0);

I only got to do to work this way:  BerforePost in TClientDataSet:

procedure TFMP47500.ClntDtStTAB_IRREGULARIDADESBeforePost(DataSet:
TDataSet);
begin

  inherited;

  DataSet.FieldByName('CD_CMC') .AsString  :=
FrmContribuinte.AHREdtCMC_COTR.Text;
  DataSet.FieldByName('CD_TENC') .AsString := ' 1000000000 ';

end;

My structure is the following:

CREATE TABLE TAB_IRREGULARIDADES

    CD_TENC CHAR(11) NOT NULL,
    CD_CMC CHAR(10) NOT NULL,
    DT_IRRG DATE NOT NULL,
    IN_CANC SMALLINT DEFAULT 1,
    DESCRICAO VARCHAR(300),
    IN_IRRG CHAR(2),
    OBS VARCHAR(300),
    NU_DOC VARCHAR(17),
    VL_IRRG NUMERIC(18,2));

/ * Primary keys definition * /

ALTER TABLE TAB_IRREGULARIDADES ADD CONSTRAINT PK_TAB_IRREGULARIDADES
PRIMARY
KEY (CD_TENC, CD_CMC, DT_IRRG);

ProviderFlags are like this:

CD_TENC, CD_CMC, DT_IRRG = PFINUPDATE, PFINWHERE, PFINKEY;

The other columns are: pfInUpdate;

DataSetProvider.UpdateMode = upWhereKeyOnly

It is even so it happens the mistake!

Delphi 6 SP1, DBExpress, FB Beta 2.

--
Succss,

Anderson Haertel Rodrigues - AHR
Florianpolis - Santa Catarina - Brazil

 

Re:Field Value Required - BUG?!


??????
"Anderson Haertel Rodrigues - AHR" <a...@ahr.com.br> escreveu na mensagem
news:3c5036c6$1_2@dnews...
Quote
> Hello,

> This error does happen with all the TFields with Required=False.

> I don't get to include a registration in GRID before executing
> ApplyUpdates(0);

> I only got to do to work this way:  BerforePost in TClientDataSet:

> procedure TFMP47500.ClntDtStTAB_IRREGULARIDADESBeforePost(DataSet:
> TDataSet);
> begin

>   inherited;

>   DataSet.FieldByName('CD_CMC') .AsString  :=
> FrmContribuinte.AHREdtCMC_COTR.Text;
>   DataSet.FieldByName('CD_TENC') .AsString := ' 1000000000 ';

> end;

> My structure is the following:

> CREATE TABLE TAB_IRREGULARIDADES

>     CD_TENC CHAR(11) NOT NULL,
>     CD_CMC CHAR(10) NOT NULL,
>     DT_IRRG DATE NOT NULL,
>     IN_CANC SMALLINT DEFAULT 1,
>     DESCRICAO VARCHAR(300),
>     IN_IRRG CHAR(2),
>     OBS VARCHAR(300),
>     NU_DOC VARCHAR(17),
>     VL_IRRG NUMERIC(18,2));

> / * Primary keys definition * /

> ALTER TABLE TAB_IRREGULARIDADES ADD CONSTRAINT PK_TAB_IRREGULARIDADES
> PRIMARY
> KEY (CD_TENC, CD_CMC, DT_IRRG);

> ProviderFlags are like this:

> CD_TENC, CD_CMC, DT_IRRG = PFINUPDATE, PFINWHERE, PFINKEY;

> The other columns are: pfInUpdate;

> DataSetProvider.UpdateMode = upWhereKeyOnly

> It is even so it happens the mistake!

> Delphi 6 SP1, DBExpress, FB Beta 2.

> --
> Succss,

> Anderson Haertel Rodrigues - AHR
> Florianpolis - Santa Catarina - Brazil

Other Threads