DataReader.GetFieldType returned null

后端 未结 6 1745
北荒
北荒 2021-01-01 17:46

In my db table Layout, there\'s one column whose type is hierarchyid (column index=4). When trying to set-up new environment (a virtual web-server, created from

6条回答
  •  青春惊慌失措
    2021-01-01 18:07

    The solution that works for me is add "Type System Version=SQL Server 2012" to connection string.

    Example: string connectionString = "Data Source=myserver;Initial Catalog=mydatabase;User ID=sa;Password=*******;Type System Version=SQL Server 2012;";

提交回复
热议问题