Page 1 of 1

HOW TO OBTAIN ROWSAFFECTED

Posted: 19.09.2016, 15:28
by M56OBER
Hi,

I want to obtain the rowaffected value in ZSQLProcessor, have you a solution?

BR
Olivier

Re: HOW TO OBTAIN ROWSAFFECTED

Posted: 19.09.2016, 16:00
by marsupilami
Hello Oliver,

it doesn't make sense to have a rows-affected-property for TZSQLProcessor because every statement in the script can affect a different number of rows. If you need the affected rows for a statement, I suggest to break down your script into single statements and check wether it is possible to get the count of affected rows from TZQuery.

With best regards,

Jan

Re: HOW TO OBTAIN ROWSAFFECTED

Posted: 21.09.2016, 13:41
by M56OBER
Thank you for your answer.
But I want to build a track of the script. I want to obtain the number of rowaffected for each request of the script Sqlprocessor.
On the event afterExcute for example

ZSQLProcessor1AfterExecute(Processor: TZSQLProcessor;
StatementIndex: Integer);


Olivier

Re: HOW TO OBTAIN ROWSAFFECTED

Posted: 26.09.2016, 15:28
by marsupilami
Hello Olivier,

hmm - in that case you might need to modify the TZSQLProcessor component to deliver the required information. Maybe having a look at TZQuery might help because I seem to remember that TZQuery can already return the modified rows count. If TZQuery can't help, there is an exception somewhere that uses this functionality.
If you want to take a dive into the code and need some help, löet me know. Unfortunately time is tight on me so I can't implement this fature currently.

With best regards,

Jan

Re: HOW TO OBTAIN ROWSAFFECTED

Posted: 27.09.2016, 07:29
by M56OBER
Hi

Indeed TZquery can turn the value RowsAffected,
so I am going to cut the script, to obtain my answer

Thank you
Olivier