I had this posted in Query Spatial Data from Database but that topic appears to be inactive. I need to bring this topic up aqain to see where my company can go with Map Suite. I'm worried that this may be a show stopper.
First a little background on the product. I am building a full featured mapping tool with map suite. I am using SQL Server Spatial for data storage. Feature attributes are stored in one table and feature graphics are stored in a separate table containing a geometry field. I do this because there is a many to one relationship between features and graphics (for instance a customer location may be asscoiated with a symbol and multiple text graphics). The opposite is also possible. Customers might live in apartments where I have a single graphic associated with multiple customer records.
I need to be able to query out feature geometry based on values in other tables.
I don't see a way around using queries written on the fly. I would expect most people using SQL Server (or other Spatial Databases) would also need this ability, especially if they are writing something more complex than a static map viewer. My users will want to create new views of their own design, which will require querying out specific features in specific areas. They are not going to want to write a complex query into the database, they will want my code to do that for them. They may decide they don't like that view and modify it on the fly. This doesn't lend itself to rigid predefined database views (which we aren't sure you support anyway). Perhaps you could simply tell us what is required in the query and put the onus of writing correct queries on the programmer.
I looked into the possibility of using Views to do this but the MsSql2008FeatureLayer doesn't support views in place of table names.
Charles