DataAction / AdoNetCore.AseClient

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

Prevent a possible IndexOutOfRangeException #132

Closed c-j-hughes closed 5 years ago

c-j-hughes commented 5 years ago

Fixes #102

I think what is happening is that the caller is calling reader.NextResult() which returns false as it is pointing past the last item in the result set. The caller should stop at this point, but must not be checking the return value. Then it calls reader.Read() which throws.

From the stack trace reported, it's the only way I can see that this could happen.

I've made reader.Read() more robust.