Column "...." cannot be null
Posted: 30.06.2008, 20:06
Hello friends,
I'm working with Mysql, using Zeos 6.6.2 RC and there is a problem with the fields Not Null and value Default.
As an example, this table:
If I make a direct integration with SQL code, as follows:
all goes well, the server is responsible automatically fill in the fields Not Nul with a vacuum'':
However, if I upgrade through a DBGrid using a TZQuery.Insert ..... TZquery.Post and is blank, for example, the color field, you get the error: Column "Color" can not be null - Do not Zeos assigns the default to the field?
Thank you,
Sebas.
I'm working with Mysql, using Zeos 6.6.2 RC and there is a problem with the fields Not Null and value Default.
As an example, this table:
Code: Select all
Create table `Articles` (
`Code` varchar (40),
`` Varchar Article (60),
`` COLOR varchar (30) NOT NULL default''
primary key ( `` Code)
) Type = InnoDB;
Code: Select all
SQL Code [-]
INSERT INTO `articles` ( `Code`
)
Value ('123 '
)
However, if I upgrade through a DBGrid using a TZQuery.Insert ..... TZquery.Post and is blank, for example, the color field, you get the error: Column "Color" can not be null - Do not Zeos assigns the default to the field?
Thank you,
Sebas.