Page 1 of 1
Can not insert/add new record in forms
Posted: Thu Aug 01, 2019 3:33 am
by akhlaq58
Hi I am new to nuBuilder. I have followed steps in nuBuilder user guide to create 2 forms. All records shown in search screen. I click add button which show me edit screen with empty fields. I fill the values and press Save button. It shows the "record saved" indication but it actually not saved. Not shown in search screen even after using refresh button. However if I edit any record, it saves successfully. I given full privileges to globeadmin user in mysql using phpmyadmin. What am I missing? I am using latest version nubuilder4-master on windows 10.
Re: Can not insert/add new record in forms
Posted: Thu Aug 01, 2019 6:06 am
by kev1n
Do you see any error messages in the debug log?
Re: Can not insert/add new record in forms
Posted: Thu Aug 01, 2019 3:52 pm
by kev1n
Re: Can not insert/add new record in forms
Posted: Thu Aug 01, 2019 4:04 pm
by akhlaq58
Hi Kevin! I checked the logs. Mostly it was showing the ID field was twice in "Insert into" statement. So I change the form structure and removed ID field. But still it shows some other error which I could not understand. Here is the log of error.
[0] : ===USER========== globeadmin ===PDO MESSAGE===
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'ID' at row 1
===SQL===========
INSERT INTO students (ID, `Name`) VALUES ('5d42e31315d2646', 'Gohar');
===BACK TRACE====
C:\wamp64\www\nubuilder4-master\nudata.php - line 348 (nuRunQuery)
C:\wamp64\www\nubuilder4-master\nuapi.php - line 52 (nuUpdateDatabase)
Is there any good tutorial to follow to design the forms correctly. Specially the form with subform.
Re: Can not insert/add new record in forms
Posted: Fri Aug 02, 2019 4:55 am
by kev1n
The ID column should be of type varchar(25).