Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

subform not saving

Questions related to using nuBuilder Forte.
Post Reply
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

subform not saving

Unread post by johan »

Hi

i'm having a problem saving multiple rows in a subform when the ver_reden field is empty. This field is a select (integer, null). If I enter 1 row with field ver_reden empty, then it will save correctly.
If I enter a value for multiple rows ver_reden, everything will run correctly.
I'll add the result of nuDebug.

Code: Select all

[0] : 
===USER==========

globeadmin

===PDO MESSAGE=== 

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column `reg_straathoekwerk`.`verwijzen`.`ver_reden` at row 1

===SQL=========== 

INSERT INTO verwijzen         (ver_id, `ver_reg_id`, `ver_datum`, `ver_type`, `ver_naar`, `ver_resultaat`, `ver_reden`, `verwijzen_nulog`)  VALUES ('5f9951581a8aaf6', '5afec6e2c0dca7a', '2020-10-28', '1034', '1109', '892', '', '{\"added\":{\"user\":\"5afc707a8d5eca0\",\"time\":1603883352}}');

===BACK TRACE====

/var/www/html/straathoekwerk/nudata.php - line 320 (nuRunQuery)

/var/www/html/straathoekwerk/nuapi.php - line 50 (nuUpdateDatabase)
Any idea?

Johan
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: subform not saving

Unread post by kev1n »

Hi Johan,

Is this due to the strict mode? (-> this is a bug and should be fixed )

https://forums.nubuilder.cloud/viewtopic. ... ict#p22115
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: subform not saving

Unread post by johan »

Kev1n

I've tested this. If I understand it correct I have to run this code to solve this problem.

Code: Select all

ALTER TABLE `zzzzsys_object` CHANGE `sob_input_count` `sob_input_count` BIGINT(20) NULL DEFAULT '0';
ALTER TABLE `zzzzsys_object` CHANGE `sob_all_order` `sob_all_order` INT(11) NULL DEFAULT '0';
After this I still have the same problem.

Johan
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: subform not saving

Unread post by Janusz »

Hi,
The code

Code: Select all

ALTER TABLE `zzzzsys_object` CHANGE `sob_input_count` `sob_input_count` BIGINT(20) NULL DEFAULT '0';
ALTER TABLE `zzzzsys_object` CHANGE `sob_all_order` `sob_all_order` INT(11) NULL DEFAULT '0';
is related to the clone of objects and its not relevant to your case.

from error message - what I can see - you try to assign:

Code: Select all

ver_reden=''
whereas this field can be integer or null.

And if it's for select object you can assign varchar() in the DB and should solve the issue
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: subform not saving

Unread post by admin »

Guys,

It should be fixed now, thanks.


Steven
johan
Posts: 399
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: subform not saving

Unread post by johan »

Hi
I've changed column to varchar and that solved my problem.

Thanks for your help.
Johan
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: subform not saving

Unread post by admin »

No worries.
Post Reply