Hello,
I have a problem with Rows Affected property.
With TMSSQL component the value of RowsAffected property depends from table trigger on update and delete commands. While ApplyUpdates of TMSQuery fails on delete command.
The property DMLRefresh of TMSQuery is active and insert/update commands work.
How to use TMSSQL without modify trigger to reflect rows affected not considering trigger rows?
Why TMSQuery has a different behavior?
SDAC version: 6.7.13 in Delphi XE4.
Thanks.
Alessandro
Rows Affected problem
Re: Rows Affected problem
Hello,
You can avoid this problem by adding the "SET NOCOUNT ON" line to the code of your triggers.
You can avoid this problem by adding the "SET NOCOUNT ON" line to the code of your triggers.
Re: Rows Affected problem
Hello,
I can't modify triggers because they are not under my control.
With old version of SDAC the returned number of rows affected was correct.
Can you suggest a way to modify your component code to mantain old behavior?
Thanks.
I can't modify triggers because they are not under my control.
With old version of SDAC the returned number of rows affected was correct.
Can you suggest a way to modify your component code to mantain old behavior?
Thanks.
Re: Rows Affected problem
Please try creating a small sample that demonstrates the problem and send it to support*devart*com , including a script to create all needed server objects (tables, triggers, etc.).
Also, please specify the exact version of your SQL Server server and client. You can learn it from the Info sheet of TMSConnection Editor.
Also, please specify the exact version of your SQL Server server and client. You can learn it from the Info sheet of TMSConnection Editor.
Re: Rows Affected problem
The point is that TMSQuery returns a correct result - count of updated rows, and TMSSQL returns count of rows in the resultset returned by the trigger.
This behaviour depends on the SQL Server specificity, and we can't influence it.
This behaviour depends on the SQL Server specificity, and we can't influence it.
Please specify the exact SDAC version, where this behaviour was different from the current one.With old version of SDAC the returned number of rows affected was correct.