I have been using DBFit 3.2 for many years, I currently have it running on a Windows 10 test machine pointing to a MS SQL Server database on another server.
I just did a new install of DBFit 4.0 on a Windows 11 machine.
Now any Query, even an Inspect Query, where the results contain a hierarchyid field type throws an exception (the number in the error varies depending on where that field is in the result set):
System.InvalidOperationException: DataReader.GetFieldType(14) returned null.
at System.Data.ProviderBase.SchemaMapping.SetupSchemaWithoutKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, Boolean gettingData, DataColumn parentChapterColumn, Object chapterValue)
at System.Data.ProviderBase.SchemaMapping..ctor(DataAdapter adapter, DataSet dataset, DataTable datatable, DataReaderContainer dataReader, Boolean keyInfo, SchemaType schemaType, String sourceTableName, Boolean gettingData, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillMappingInternal(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 schemaCount, DataColumn parentChapterColumn, Object parentChapterValue)
The database is the same, I'm using the same connection string:
!|Connect|Server=myserver; Database=mytestdb; Trusted_Connection=yes;Type System Version=SQL Server 2012;|
I tried copying my old DBFit 3.2 installation to the new machine and I get the same error.
So I feel like I'm missing some package or dependency on this new machine, possibly Windows 11 specific, but can't figure out what else I need to install or set up.
Any ideas?
Thanks.
Allen