Can not insert/add new record in forms

Questions related to using nuBuilder Forte.

Can not insert/add new record in forms

Postby akhlaq58 » Thu Aug 01, 2019 11:03 am

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.
akhlaq58
 
Posts: 2
Joined: Fri Apr 12, 2019 2:03 am

Re: Can not insert/add new record in forms

Postby kev1n » Thu Aug 01, 2019 1:36 pm

Do you see any error messages in the debug log?
kev1n
 
Posts: 970
Joined: Mon Oct 15, 2018 2:13 am


Re: Can not insert/add new record in forms

Postby akhlaq58 » Thu Aug 01, 2019 11:34 pm

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.
akhlaq58
 
Posts: 2
Joined: Fri Apr 12, 2019 2:03 am

Re: Can not insert/add new record in forms

Postby kev1n » Fri Aug 02, 2019 12:25 pm

The ID column should be of type varchar(25).
kev1n
 
Posts: 970
Joined: Mon Oct 15, 2018 2:13 am


Return to General



cron