Trigger raise an error

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
manz
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 02.06.2008, 03:58
Location: Cilegon
Contact:

Trigger raise an error

Post by manz »

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 ???
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Have a look at Zeoslib trunk snapshot. (http://zeosdownloads.firmos.at/downloads/snapshots/). Does the problem still exist there?
We did try to fix bug #90 (http://zeosbugs.firmos.at/view.php?id=90).
Did this solve your problem? If not, please, provide a very small test project: mysql table creation script (mysqldump) and a simple project using only one connection, zquery, ... I know I could make this myself, but usually it proves that the users wanted to do just something a little different.

Mark
Image
manz
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 02.06.2008, 03:58
Location: Cilegon
Contact:

Post by manz »

Dear mdaems,

looks like that same bug with http://zeos.firmos.at/viewtopic.php?p=6540 threads, we already corrected the source and recompile with last Zeoslib trunk snapshot ... we get 361 version.

The problem resolved.

Thanks ... we'll continuing using the zeos for our projects.

Man'z
manz
Fresh Boarder
Fresh Boarder
Posts: 24
Joined: 02.06.2008, 03:58
Location: Cilegon
Contact:

Post by manz »

Post Reply