none
SqlConnection.GetSchema("DataTypes") returns wrong data (BUG) RRS feed

  • Question

  • using ADO.NET to determine datatype info but MSSQL returns tinyint as "System.SByte" when it should be "System.Byte" as this datatype is UNsigned (i.e. valid range 0-255) corresponding to C# byte. I am amazed that this bug has hidden undiscovered so long. MS please fix!

    DickInKent

    Sunday, November 15, 2020 12:10 PM

All replies

  • Hi Dick,
    Based on this blog, the new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package.
    And the SQLProvider also has been provided to fix the problem with writing tinyints in SQL Server.
    So I suggest you try the preview bits by installing the Microsoft.Data.SqlClient package.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 16, 2020 3:20 AM