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
hierarchyid
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;";