Home > database >  MATLAB Access insert function application problems Variable fields and insert fields do not match.
MATLAB Access insert function application problems Variable fields and insert fields do not match.

Time:09-29

Ready to write a program to add information in the database, but have a mistake, don't know where is wrong, ask the great spirit guide, online etc.

DlgTitle='add product related information;
LineNo=1;
Prompt={' date ', 'number of frozen fish, frozen fish amount,' dairy number ', 'milk amount', 'fresh longan number', 'fresh longan amount', 'number of banana,' banana amount '};
Def={' 2000 ', '10', '1000', '10', '1000', '10', '1000', '10', '1000'};
Answer=inputdlg (prompt, dlgTitle, lineNo, def);
% %
Conna=database (' Sheet1 ', ' ', ');
exdata=https://bbs.csdn.net/topics/answer ';
Colnames={' date ', 'number of frozen fish, frozen fish amount,' dairy number ', 'milk amount', 'fresh longan number', 'fresh longan amount', 'number of banana,' banana amount '};
Tablename='mainall';
Insert (conna tablename, colnames, table)
Close (conna)


Error using the database/fastinsert (line 111)
Variable fields and insert fields do not match.

Error database/insert (line 37)
Fastinsert (connect, tableName, fieldNames, data)

Error Untitled2 (line 11)
Insert (conna tablename, colnames, table)
  • Related