MS Access SQL error

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Mehraban
User
Posts: 11

MS Access SQL error

Post by Mehraban »

Hello
I receive the following error when adding a new record in an application that is backed by Microsoft Access.
Unfortunately, I could not fix it and find the source of the error!
Stay with me so I can fix this Error

Failed to execute SQL. Error: An INSERT INTO query cannot contain a multi-valued field. (-210635919)


mobhar
User
Posts: 11741

Post by mobhar »

Please review your tables schema and/or any code you wrote in any server events; as the error message said, it cannot allow INSERT INTO contain a multi-value field.


Mehraban
User
Posts: 11

Post by Mehraban »

I am thankful with your guidance
But I still did not get the exact problem!
I launched the project on the home system, and in the configuration section, I did not consider any features for the server part.

If it's possible for you to guide me further

Thank you


arbei
User
Posts: 9396

Post by arbei »

You may click Tools -> Advanced Settings, turn on Debug, generate the ewcfg15.php (assume v2019) again and run the script again. See if you can see the complete error message, including the SQL and the line number of the script that gives error. Post more info so other users can try to help you.


Mehraban
User
Posts: 11

Post by Mehraban »

after enable that option;
This text was shown above the header:
ADOConnection._Execute(INSERT INTO [PeopleTbl] ([peo_Name],[peo_CodeMeli],[peo_NPedar],[peo_ShSh],[peo_Mobile],[peo_Tel],[peo_Address],[peo_Attachments..., false) % line 1228, file: adodb.inc.php
ADOConnection.Execute(INSERT INTO [PeopleTbl] ([peo_Name],[peo_CodeMeli],[peo_NPedar],[peo_ShSh],[peo_Mobile],[peo_Tel],[peo_Address],[peo_Attachments...) % line 407, file: PeopleTbl.php
PHPMaker2019\Cars_Gallery\PeopleTbl.insert(Array[11]) % line 1360, file: PeopleTbl_add.php
PHPMaker2019\Cars_Gallery\PeopleTbl_add.addRow(null) % line 658, file: PeopleTbl_add.php
PHPMaker2019\Cars_Gallery\PeopleTbl_add.run() % line 23, file: PeopleTblindex.phpadd.php

and in error style:
Failed to execute SQL: INSERT INTO [PeopleTbl] ([peo_Name],[peo_CodeMeli],[peo_NPedar],[peo_ShSh],[peo_Mobile],[peo_Tel],[peo_Address],[peo_Attachments],[peo_Note],[peo_RegTime],[peo_UsrReg]) VALUES ('Alireza','1234567890','Alferedo','123','+989153072938','+985136555984',NULL,NULL,NULL,NULL,NULL). Error: An INSERT INTO query cannot contain a multi-valued field. (-210635919)

If there is something else, say it


mobhar
User
Posts: 11741

Post by mobhar »

This has nothing to do with PHPMaker feature itself; and it seems this is related to MS Access Database. So, please try Google "INSERT INTO query cannot contain a multi-valued field. (-210635919)" for more info and solution.


Mehraban
User
Posts: 11

Post by Mehraban »

Salam;

Asking this problem in Persian forums, my friends advised:
The reason for this error was the presence of an attachment field in the access table, which was fixed by changing this field to the long text!


Post Reply