Hello my problem is this. When I want to update a data record in my Access database I get the error "Too many fields defined". I create the update string myself.
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);
I haven't found a suitable answer yet
Microsoft Docs Is not this?
Cause the internal column count that Microsoft Access uses to track the number of fields in the table has reached 255, even though you may have fewer than 255 fields in the table. This can happen because Access does not change the internal column count when you delete a field. Access also creates a new field (increasing the internal column count by 1) for every field whose properties you modify.