Skip to content

Conversation

@n3rada
Copy link

@n3rada n3rada commented Oct 26, 2025

Hello @gabrielg5 👋

This pull request adds support for parsing SQL Server sql_variant types in the TDS protocol implementation. The main change is the introduction of the TDS_SSVARIANT class, which can parse and extract the value of a sql_variant field according to the [MS-TDS] specification: https://learn.microsoft.com/fr-fr/openspecs/windows_protocols/ms-tds/2435e85d-9e61-492c-acb2-627ffccb5b92

I is useful for queries such as:

SELECT value_in_use FROM sys.configurations WHERE name = 'show advanced options';

Of course, for this specific case, it could be "bypassed" using CAST(value_in_use AS INT), but i thought it could be great to add this type inside the code directly.

Before:
image

After:
image

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant