Page 1 of 1

BUG: before-insert trigger gets ignored while bulk-insert / import

Posted: Tue 27 Nov 2012 10:46
by michabbb
dear support,

today i noticed a "little" bug: i tried to insert a CSV file into a table with a date-field
that was declared as "NOT NULL" but a trigger exists (before insert: set field = NOW()).
a normal insert of course works, because the before-insert-trigger catches the call and sets the "not null field" to NOW().

the bulk insert via the import-funktion of dbforge forces me to enter a default-value
and even if i insert one, the import function still gets me an error that "no" default is set, even i set one, that´s confusing.

if a before insert trigger exists for a "not null field", it would be perfect to check this so the import function do not force me to insert a not needed value.

regards,
micha

Re: BUG: before-insert trigger gets ignored while bulk-insert / import

Posted: Tue 27 Nov 2012 16:06
by alexa
Could you please provide us the following information:

1. CREATE TABLE statement (right-click the object in Database Explorer and select 'Generate Script As -> CREATE' from the popup menu).

2. Sample .csv file to reproduce the issue.

3. CREATE TRIGGER statement (right-click the object in Database Explorer and select 'Generate Script As -> CREATE' from the popup menu).
a normal insert of course works,
We were not able to reproduce this. Could you please provide us such query?
the bulk insert via the import-funktion of dbforge forces me to enter a default-value and even if i insert one, the import function still gets me an error that "no" default is set, even i set one, that´s confusing.
Could you please clarify where you are entering a default value?

Re: BUG: before-insert trigger gets ignored while bulk-insert / import

Posted: Tue 04 Dec 2012 12:11
by michabbb
i will, sorry for late answer... takes me some time to get all the stuff, next i will send it to you with my post, sorry