Trigger raise an error
Posted: 02.06.2008, 04:16
Dear all,
We've face the problem when using the zeos connect to simple mysql server.
Here the configuration :
Mysql 5.0.45-community nt
zeosdbo-6.6.2-rc
table :
create table m_unit
(
uom_code varchar(20) not null,
uom_description varchar(20) default '',
create_date timestamp default '0000-00-00 00:00:00',
update_date timestamp default '0000-00-00 00:00:00',
constraint pk_m_unit primary key (uom_code)
);
create trigger m_unit_cr_date before insert on m_unit for each row
set new.create_date = now(), new.update_date = '0000-00-00 00:00:00';
create trigger m_unit_up_date before update on m_unit for each row
set new.update_date = now(), new.create_date = old.create_date;
when we use the grid for input data and post it, that delphi say :
First chance exception at $761842EB. Exception class EDatabaseError with message 'Field 'create_date' must have a value'. Process Logistic.exe (248)
they said that field create_date must have a value, we already define it on when we create table.
But, when we use another component connection, thats no found any problem.
Anyone can help ???
We've face the problem when using the zeos connect to simple mysql server.
Here the configuration :
Mysql 5.0.45-community nt
zeosdbo-6.6.2-rc
table :
create table m_unit
(
uom_code varchar(20) not null,
uom_description varchar(20) default '',
create_date timestamp default '0000-00-00 00:00:00',
update_date timestamp default '0000-00-00 00:00:00',
constraint pk_m_unit primary key (uom_code)
);
create trigger m_unit_cr_date before insert on m_unit for each row
set new.create_date = now(), new.update_date = '0000-00-00 00:00:00';
create trigger m_unit_up_date before update on m_unit for each row
set new.update_date = now(), new.create_date = old.create_date;
when we use the grid for input data and post it, that delphi say :
First chance exception at $761842EB. Exception class EDatabaseError with message 'Field 'create_date' must have a value'. Process Logistic.exe (248)
they said that field create_date must have a value, we already define it on when we create table.
But, when we use another component connection, thats no found any problem.
Anyone can help ???