定义的字段太多 Access DB Oledb

Too many fields defined Access DB Oledb

你好,我的问题是这个。当我想更新 Access 数据库中的数据记录时,出现错误“定义的字段太多”。我自己创建更新字符串。

string query = "";
query = "UPDATE Example SET Dateiname = '" + listofObjects[i].fileName
                                                              + "', Dateidatum = '" + listofObjects[i].fileDate
                                                              + "', DateidatumString = '" + listofObjects[i].dateTimeString
                                                              + "', VolleStundeString = '" + listofObjects[i].fullHourString
                                                              + "', Datum = '" + listofObjects[i].date
                                                              + "', Transportiert = '" + listofObjects[i].transported
                                                              + "', Erfasst = '" + listofObjects[i].detected
                                                              + "', Transportnummer = '" + listofObjects[i].transportNum
                                                              + "', Bearbeitet = '" + listofObjects[i].processed
                                                              + "', SequenceNumber = '" + listofObjects[i].sequenceNum
                                                              + "', File_Delete = '" + listofObjects[i].file_Delete + "'";



                    for (int e = 0; e < anzahl; e++)
                    {
                        query += ", WERT_" + (e + 1) + " = '" + listofObjects[i].LineValueObjects[e].value
                                                             + "', WERT_" + (e + 1) + "_O = '" + listofObjects[i].LineValueObjects[e].value_o
                                                             + "', WERT_" + (e + 1) + "_Q = '" + listofObjects[i].LineValueObjects[e].value_q
                                                             + "', WERT_" + (e + 1) + "_Q_VS = '" + listofObjects[i].LineValueObjects[e].value_q_full
                                                             + "', WERT_" + (e + 1) + "_VS = '" + listofObjects[i].LineValueObjects[e].value_full + "'";
                    }
                    
                    query += " WHERE Dateiname = '" + listofObjects[i].fileName + "'";

                    dbm.updateDB(query);

我还没有找到合适的答案

Microsoft Docs 不是这个吗?

导致 Microsoft Access 用于跟踪 table 中的字段数的内部列计数已达到 255,即使 [=17] 中的字段可能少于 255 个=].发生这种情况是因为 Access 在您删除字段时不会更改内部列计数。 Access 还会为您修改其属性的每个字段创建一个新字段(将内部列计数增加 1)。