Page 1 of 1

6.6.0 beta, Firebird, DEFAULT NULL in domain *AND* in table

Posted: 07.03.2007, 14:24
by tomcmok
try this:

CREATE DOMAIN BASENAZWANULL AS
VARCHAR(100) CHARACTER SET WIN1250
DEFAULT NULL
COLLATE PXW_PLK;

CREATE TABLE TEST (
ID INTEGER NOT NULL,
TEST BASENAZWANULL DEFAULT null
);

...then put on a form simple TZQuery, set it's SQL to "select * from TEST"and connect a dbGRid to it and try to insert a record but leave field TEST empty and post.

I'm getting this:

"Token unknown (..) DEFAULT (...) Invalid token The SQL: SELECT DEFAULT NULL FROM RDB$DATABASE"

That "SELCT DEFAULT NULL" is obviously wrong syntax - it seems ZEOS get's confused if DEFAULT NULL is used both in DOMAIN and in table's field definition.

Any quick fix or a remark where to do the fix?

Cheers,
Tomasz

Posted: 07.03.2007, 16:51
by mdaems
Hi Tomasz,

I suppose it shouldn't be to difficult to fix this thing but I'm not using firebird so it will be somebody else's job. I think a quick source search for RDB$DATABASE in all source files with 'Interbase' in the name will give you a hint about where to start.
ATTENTION : if you want this bug to be tracked, please register it to our bugtracker at http://zeosbugs.firmos.at . Here the post will sink down the forum and will be forgotten in a while. Anonymous access should be possible if you don't want to register to the bug tracker, but we prefer you do register, so it's easier to contact you later when the bug is fixed.

Mark

Posted: 09.03.2007, 13:48
by tomcmok
Mark,

Thanks for the reply, I'll register a bug. I think I've also found another one in the Firebird dbc - and I register it there as well

Cheers