# Exception in MsSqlfeaturelayer with Sql server spatial index

**URL:** <https://community.thinkgeo.com/t/exception-in-mssqlfeaturelayer-with-sql-server-spatial-index/3530>\
**Category:** WPF\
**Created:** [October 9, 2013, 7:52am UTC](https://community.thinkgeo.com/t/exception-in-mssqlfeaturelayer-with-sql-server-spatial-index/3530 "2013-10-09T07:52:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lalitya](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/6f9a4e/32.png) [@lalitya](https://community.thinkgeo.com/u/lalitya)\
**Post date:** [October 9, 2013, 7:52am UTC](https://community.thinkgeo.com/t/exception-in-mssqlfeaturelayer-with-sql-server-spatial-index/3530/1 "2013-10-09T07:52:10Z")

</div>

Hi,  
  
  
  
I&nbsp;am&nbsp;using&nbsp;wpf&nbsp;mapsuite&nbsp;7.0,&nbsp;VS&nbsp;2012,.Net&nbsp;4.0&nbsp;and&nbsp;using&nbsp;MsSqlfeaturelayer&nbsp;and&nbsp;spatial&nbsp;tables&nbsp;with&nbsp;sqlserver&nbsp;2012  
  
  
  
when&nbsp;i&nbsp;create&nbsp;a&nbsp;spatial&nbsp;index&nbsp;on&nbsp;table&nbsp;i&nbsp;am&nbsp;not&nbsp;able&nbsp;to&nbsp;create&nbsp;the&nbsp;layer(getting&nbsp;an&nbsp;exception).  
  
  
  
If&nbsp;I&nbsp;remove&nbsp;the&nbsp;index&nbsp;its&nbsp;working&nbsp;fine.  
  
  
  
please&nbsp;take&nbsp;the&nbsp;exception&nbsp;details&nbsp;from&nbsp;attachments.  
  
  
  
thanks&nbsp;a&nbsp;lot&nbsp;for&nbsp;your&nbsp;help.  
  
  
  
  
  
  
[002\_001\_Exception.txt](https://community.thinkgeo.com/uploads/default/original/1X/16df87b884c955de79701941bd2f371d7af555ba.txt) (3.58 KB)

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [October 10, 2013, 4:29am UTC](https://community.thinkgeo.com/t/exception-in-mssqlfeaturelayer-with-sql-server-spatial-index/3530/2 "2013-10-10T04:29:13Z")

</div>

Hi&nbsp;Lalitya,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post,&nbsp;we&nbsp;tried&nbsp;to&nbsp;recreate&nbsp;the&nbsp;problem&nbsp;on&nbsp;our&nbsp;end,&nbsp;but&nbsp;I&nbsp;am&nbsp;sorry&nbsp;to&nbsp;say&nbsp;that&nbsp;it&nbsp;didn’t&nbsp;show&nbsp;up,&nbsp;would&nbsp;you&nbsp;please&nbsp;provide&nbsp;us&nbsp;the&nbsp;setting&nbsp;code&nbsp;for&nbsp;MsSqlFeatureLayer?&nbsp;if&nbsp;possible,&nbsp;a&nbsp;self&nbsp;contained&nbsp;sample&nbsp;and&nbsp;a&nbsp;back&nbsp;up&nbsp;of&nbsp;your&nbsp;data&nbsp;table(better&nbsp;in&nbsp;.sql&nbsp;file&nbsp;mode)will&nbsp;be&nbsp;highly&nbsp;appreciated.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Waiting&nbsp;for&nbsp;your&nbsp;further&nbsp;information.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer
