Hi,
If we see the help for StrictUpdate property of class "TDADataSetOptions" in DBAccess file, it says:
"StrictUpdate TCustomDADataSet raises exception when number of the updated or deleted records does not equal to 1. Setting this option also causes an exception if RefreshRecord procedure returns more than one record. The exception does not occur when you use non-SQL block."
In our application, there is an instance, where on clicking the delete button, all the records displayed in a grid are deleted. In that scenario, the FUpdateQuery.RowsAffected count is greater than 1 and in the following condition of 'PerformSQL' function of the 'DBAcess.pas' file :
------------------------------------------------------------------------------------
" if FOptions.StrictUpdate and
//(Command.SQLType in [SQL_INSERT,SQL_UPDATE,SQL_DELETE]) and /// for ODAC
((FRowsAffected = 0) or (FRowsAffected > 1))
then
DatabaseError(Format(SUpdateFailed, [FRowsAffected])); "
-----------------------------------------------------------------------------------
is giving an error Message.
This is happening because the parameter "StrictUpdate " is set to true in the constructor of class "TDADataSetOptions"
If we change the value to 'false' in the construtor, the error is not raised and application is running fine.
Will setting "StrictUpdate " to false in the constructor can have severe implications on other db operations ?
Please instruct Us regarding the same and any other possible solutions other than this.
Waiting for your clarification on the same,
Regards
Balajee