DataAction / AdoNetCore.AseClient

AdoNetCore.AseClient - a .NET Core DB Provider for SAP ASE
Apache License 2.0
108 stars 45 forks source link

AseDataReader.RecordsAffected doesnt return correct value #153

Closed sgwyn closed 4 years ago

sgwyn commented 5 years ago

I've noticed the RecordsAffected property doesn't seem to behave as expected. Does anybody else experience the same problem?

AseDataReader.RecordsAffected returns 0 for all Update, delete and insert statements, returns row count for select statements

according to other implementations of DataReader including Sybase documentation it should return The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements.

Environment

senseibaka commented 5 years ago

Hi @sgwyn good find. It appears our implementation of RecordsAffected is incorrect.

I'll add a fix to the next release

c-j-hughes commented 4 years ago

@sgwyn - heard you had a fix for this. Can you send a PR?