6.6.0 beta, Firebird, DEFAULT NULL in domain *AND* in table
Posted: 07.03.2007, 14:24
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
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