ThinkGeo.com    |     Documentation    |     Premium Support

MsSql2008FeatureLayer quesiton

Is it possible to use a MsSql2008FeatureLayer connected to a SQL Server table and filter what the user sees.


Let' say I'm connected to a table where I have shapes that cross years.  I want to be able to say use this table but only show the 2008 features or be able to switch from 2008 features to 2009 features.


Does that make sense?



Peter, 
  
 I think you can use ValueStyle to filter some of shapes. We have a sample DrawAFeatureBasedOnAValue in HowDoI samples at Styles catalog that you can look at it. 
  
 For your detail requirement, I think your table must have a column represents year, I supposed its name is "Year", and when you want to show the shapes, you have to set the style of the zoomlevel, you can create a ValueStyle and set the ColumName is "Year" and add a ValueItem which value is "2008" or "2009". 
  
 Please let me know if you have more questions. 
  
 Thanks 
 James