Closed brianchance closed 6 years ago
It looks like I lost all of the test cases for DB2 when we upgraded to .net core support. Let me see what I can do with this issue.
As a test, I inherited from DB2InsightDbProvider and overrode IsXmlColumn with
return string.Compare(((DbDataReader)reader).GetDataTypeName(index), "XML", StringComparison.OrdinalIgnoreCase) == 0;
Seems to work.
The code in master has been updated. Now I just have to find time to run a build.
This is fixed in v6.2.6, available now.
@jonwagner - works, thank you.
Describe the bug
Getting an error working with DB2.
Looking at the IBM.Data.DB2.Core source, the DB2DataReader does not implement IDbColumnSchemaGenerator. Looking at DB2InsightDbProvider.IsXmlColumn, it also does not implement GetSchemaTable.
Digging down, I see that there is an
internal DB2Type GetDB2Type(int i)
which is of no use. There is however apublic override string GetDataTypeName(int i)
from DbDataReader which returns the TypeName instead of the DB2Type of same the underlying structure as DB2Type. Based on the rest of their code, it should return "XML".Maybe IsXmlColumn would be...
return ((DbDataReader)reader).GetDataTypeName(index) == "XML"
Steps to reproduce
Any extension methods on reader or query i.e. 'return await GetConnection().QuerySqlAsync("select col from table");`