rows affected batchupdate
rows affected batchupdate
Hi,
I would like to use batchUpdate, giving an array of values to run updates.
However, for each line in the parameter array, I would like to know how many values were updated.
is there any return value like rowsaffected[i] that could be used?
I would like to use batchUpdate, giving an array of values to run updates.
However, for each line in the parameter array, I would like to know how many values were updated.
is there any return value like rowsaffected[i] that could be used?
Re: rows affected batchupdate
Hi There,
Unfortunately, it’s not possible to check the information regarding the number of changes for each string.
If you use batchUpdate you may check only general results of all executed queries. In case you need information regarding each query separately, you need to execute them separately.
You may find more information about Batch operation in our documentation:
https://blog.devart.com/using-batch-ope ... nents.html
Regards,
Evgeniy
Unfortunately, it’s not possible to check the information regarding the number of changes for each string.
If you use batchUpdate you may check only general results of all executed queries. In case you need information regarding each query separately, you need to execute them separately.
You may find more information about Batch operation in our documentation:
https://blog.devart.com/using-batch-ope ... nents.html
Regards,
Evgeniy
Re: rows affected batchupdate
"it’s not possible" or ", it’s not YET possible"?
This would be a nice improvement in a future release, it just costs an DynamicArray<__int64>.
Thanks.
This would be a nice improvement in a future release, it just costs an DynamicArray<__int64>.
Thanks.
Re: rows affected batchupdate
Hi there,
When executing BatchUpdate server receives all data as one query, accordingly it may return one result only. It allows to significantly speed up the data refresh.
In order to extract data for each query they need to be executed separately and results saved separately as well. However, in such case the sense of BatchUpdate is lost because the speed will be almost similar to sequential execution of all requests. You may implement the sequential query behavior yourself using the method:
Execute(Iters: integer; Offset: integer = 0)
For instance:
Regards,
Evgeniy
When executing BatchUpdate server receives all data as one query, accordingly it may return one result only. It allows to significantly speed up the data refresh.
In order to extract data for each query they need to be executed separately and results saved separately as well. However, in such case the sense of BatchUpdate is lost because the speed will be almost similar to sequential execution of all requests. You may implement the sequential query behavior yourself using the method:
Execute(Iters: integer; Offset: integer = 0)
For instance:
Code: Select all
for i := 0 to RowCount do begin
SQL.Execute(1, i);
ar[i] := SQL.RowsAffected;
.....
end;
Evgeniy
Re: rows affected batchupdate
you say " server receives all data as one query"
=> If parameters are in where clause, I guess that at db server they are split somewhere, no??????
=> If parameters are in where clause, I guess that at db server they are split somewhere, no??????
Re: rows affected batchupdate
Hi There,
We can investigate this option.
If you want us to implement support of data display in RowsAffected for each query in BatchUpdate please post this suggestion at our user voice forum:
https://devart.uservoice.com/forums/104 ... components
If the suggestion gets a lot of votes, we will consider the possibility to implement it.
At the moment you may follow the steps we described before.
Regards,
Evgeniy
We can investigate this option.
If you want us to implement support of data display in RowsAffected for each query in BatchUpdate please post this suggestion at our user voice forum:
https://devart.uservoice.com/forums/104 ... components
If the suggestion gets a lot of votes, we will consider the possibility to implement it.
At the moment you may follow the steps we described before.
Regards,
Evgeniy
Re: rows affected batchupdate
ok, thanks!
Re: rows affected batchupdate
Hi There,
Thanks for using our product.
Feel free to contact us anytime- we are always ready to help.
Regards,
Evgeniy
Thanks for using our product.
Feel free to contact us anytime- we are always ready to help.
Regards,
Evgeniy