Bandeau
Gestinux

Support and Development forum

SQL Error : Field ’CountryCodeId’ doesn’t have a default value

tintinux
le 23 janvier 2021
à 10:01
Rappel du sujet :

Hi

This error is not a Gestinux bug, but a consequence of a change in recent versions of MySql and MariaDb.

It looks like that, with a default configuration, it is no more allowed to INSERT in a Table without listing all the fields, whenever the missing fields have a default value or can be NULL.

This is done in several places in Gestinux, and I’m not sure that this can be changed in next versions. IMHO this is a bug regarding to SQL standards.

It is possible to avoid this error with adding in the configuration file of the server :

[client-server]
sql_mode = NO_ENGINE_SUBSTITUTION

The configuration files for Linux are in : /etc/mysql/mysql.cnf or mariadb.cnf
For Windows they are in : c :\windows\system
You must have admin rights to edit them, and restart the server after the changes.

Any suggestions or informations about this annoying problem are welcome !

Réagir au sujet
Forum sur abonnement

Pour participer à ce forum, vous devez vous enregistrer au préalable. Merci d’indiquer ci-dessous l’identifiant personnel qui vous a été fourni. Si vous n’êtes pas enregistré, vous devez vous inscrire.