Could not perform the edit because another user changed the record

5

Does anyone know if there is any trace of a table that is dropped from a bank? To facilitate if it is recreated, for example, and when I say trace is in the bowels of the same bank.

I'm going through that famous problem of 'Could not perform the edit because another user changed the record.' in a SQL connection with BDE / Delphi, the programming part in Delphi has already done everything to avoid the problem.

Now, if you create a new table with another name, but with the same structure and table data that has the field that displays the error, which in this case is FLOAT , the table new does not display the error.

Following this process, if you delete the table that presented the error, and recuse it with the same name, taking the structure of the new table that you created and passing the data back to that table, the error happens again.

That is, the problem only happens when I create the table with the name in which the error was first displayed. The only suspicion I have left is that the database stores some information about the table that has been dropped, and when it is re-created, it edits your data in some way, which causes the error.

    
asked by anonymous 14.09.2015 / 14:14

1 answer

1

In fact the problem is with the BDE itself. Not with the database.

If the answer was only about BDE, my recommendation would actually be to leave the BDE and move on to a less problematic provider of data mapping, such as FreeDAC , for example. Or, for SDAC , or ADO (already comes with Delphi), if you have the patience to adapt the code and sort the parameters in the order they appear.

After this little recommendation, let's go to the answer.

This problem occurs with some things. In general, to solve, do the following, I assume a structure with a TDataSetProvider and a TClientDataset :

DatasetProvider.UpdateMode = upWhereKeyOnly;
ClientDataSet.ProviderFlags = [pfInUpdate];

In the key field of TClientDataSet set ProviderFlags = [pfInUpdate, pfInWhere, pfInKey] .

Also remove ProviderFlags from all other fields.

    
14.09.2015 / 16:17