Error posting through Delphi

2

I have a table that only has one record this table I save the system parameters it only has one item saved and its item number will be greater than 1 soon it does not have a primary key , but when I try to change the system parameters it presents this error:

  

Update command updated [0] instead of [1] record.   Possible reasons: update table does not have PK or row identifier, record has been changed / deleted by another user.

Possible reasons: the update table does not have PK or line identifier, the recording has been changed / deleted by another user.

The table does not need a PK since it does not relate to others and it has not been changed by another user since I am running it locally for testing. Does anyone know how to solve this?

    
asked by anonymous 12.07.2017 / 14:16

2 answers

1

Searching for more I found this on docwiki.embarcadero

UpdateOptions.UpdateMode controls the generation of the WHERE clause to publish updates and deletions. The default value upWhereKeyOnly uses only the unique ID columns in the WHERE phrase and provides an efficient and secure way of locating the update line. When no unique ID column is specified and no row ID column is found, FireDAC will change UpdateOptions.UpdateMode to upWhereAll . The following fields included in the WHERE clause can lead to the error "no rows found"

It shows the properties you will have to disable to resolve this problem.

  • Providing correct unique ID columns;
  • Disabling some fields with use WHERE excluding% with% property% with corresponding%
  • Suppressing these errors by setting pfInWhere to False .
  • 12.07.2017 / 15:34
    2

    If this does not resolve. I think in this case, you could use an ini file instead of a table. Usually we use .ini file to save system parameters, it is very effective.

        
    15.07.2017 / 04:34