-
Notifications
You must be signed in to change notification settings - Fork 147
Description
Describe the bug
If you have 2 databases with the same named table but different set of columns, when referencing the 2nd database the Provider throws an error that the columns in the first database table do not exist. In our application we support referencing multiple database configurations that all start with common tables and columns but each configuration can be customized.
To Reproduce
Steps to reproduce the behavior:
- Create 2 databases with a single table named Products. Both have an Id and Product Name. In the first database add one additional column - Sell_By_Date, allowing it to be NULL.
- Create a simple F# program to open a connection to both databases. Query the first database (the one with the extra column in it) and force the sequence to evaluate, then query the 2nd database and force the sequence to evaluate.
- See error: Invalid column name 'Sell_By_Date'.
Expected behavior
I expect the metadata for the 2nd instance would reflect the actual columns in the table.
Screenshots
Vanilla db used to build against:
Sample program:
Environment (please complete the following information):
- Database: SqlServer V16.0.1145.1
- Nuget Package and version: SQLProvider 1.5.12
- OS: Windows 11
- Dotnet 9
Additional context
We handle write operations to tables that we allow to have configuration-specific columns via T-SQL commands so this really only affects read-operations.