Closed rob2244 closed 1 month ago
thx for opening an issue. We have a test for DatabaseTypeName() that passes, here: https://github.com/microsoft/go-mssqldb/blob/9b84d9bacd9bfaca0d33c4a855ad52b1b8b6cb35/queries_test.go#L1641 Does this happen with other databases/servers or just this one?
@shueybubbles thanks for the quick response! afaik, only this db/server. I haven't tested any others. Happy to provide any other information that might help in debugging.
I got the adventureworksdw2022 files from here and imported them into the azure sql instance:
https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver16&tabs=data-studio The .bak approach was a little cumbersome so I just downloaded and ran the scripts near the bottom of the page
@shueybubbles figured out the issue: I'm wrapping the sql driver in the otsql driver to add otel support. Looks like otsql is not correctly passing through the data types:
Apologies for the false alarm
Describe the bug When any sort of query and then trying to introspect the database types on the result set via ColumnTypes()[i].DatabaseTypeName the type name is always an empty string. Additionally there is not error returned from ColumnTypes() which would indicate any errors from parsing type names.
To Reproduce
Expected behavior I expected the correct database type names to be returned and not empty strings
Further technical details
SQL Server version: (e.g. SQL Server 2017): Azure SQL With Server encryption turned on and a server level encryption key
Table schema: Adventure works Fact Internet Sales Table