Page 1 of 1

How can I obtain value set in triggers?

Posted: 14.07.2006, 15:38
by pbuczek
I switched from version 6.1.5 and I've met a problem.
I have got in my application queries which retrieves all fields from one or more tables. Values of some fields are set in before or after insert triggers. Values of this fields are required, so fields cannot be empty, but I don't want to fill this fields in my c++ code. I want to have my business logic saved in dbms. I use the standard pair of functions: Insert and Post.

What to do to allow my program to save data? Any ideas?


I use BCB2k6, Firebird and Zeos 6.5.1 taken from cvs.

Thanx in advance
pbuczek

Posted: 15.07.2006, 09:46
by Terence
Sounds you likely could use "slq defaults def" for insert statements with some fields having default values, either you have to calculate them from others fields and don't wanna do that client side.
I didn't exactly understood your question, but if you wanna save variables on server side beyond the actual sps call i think yu have to save the values in tables.
However there is also a pretty good doc for firdbird 1.53 included (doc/Firebird_v1.5.3.ReleaseNotes.pdf) , see page 43 ff for PSQL cmds and features.

Posted: 15.07.2006, 22:35
by pbuczek
Solved. To allow to save incomplete records with some empty not-null-fields one should change the property Required of proper fields to false. Of course this fields are filled in db triggers.

pbuczek