SQL Server to .Net type conversions

后端 未结 3 1291
無奈伤痛
無奈伤痛 2021-01-03 02:34

I have the following map that I use to convert betwen SQL Server types, SQLData types, and .NET types:

/// 
    /// The map of types. THis map         


        
3条回答
  •  伪装坚强ぢ
    2021-01-03 03:08

    char is not the correct .NET data type for a SQL Server char. It must be converted to either char[] or string, since a SQL char can hold more than one character.

    The Microsoft reference here agrees with me. The other ones look correct.

提交回复
热议问题