You're welcome Maya, but sorry to tell you the where clause will not take effect if the ExecutingSqlStatementType is GetSpatialDataType, GetColumns, BuildIndex, GetBoundingBox. I think you can change your code to,
MsSql2008FeatureLayer sqlFieldBdryLayer = new MsSql2008FeatureLayer(spatialConnectionString, "*********", "farm_name");
string whereClause = "where WO_ID=" +***+ "and legal_desc='*******'";
sqlFieldBdryLayer.WhereClause = whereClause;
sqlFieldBdryLayer.Open();
RectangleShape rectBoundingBox=null;
if(sqlFieldBdryLayer.HasBoundingBox)
{
Collection<Feature> features = sqlFieldBdryLayer.GetAllFeatures(..);
rectBoundingBox = features[0].GetBoudingBox();
for(int i = 1; i < features.Count; i++)
{
rectBoundingBox.ExpandToInclude(features[i].GetBoudingBox());
}
}
Hope it helps,
Edgar